program 1:
#include <iostream>
using namespace std;
int main() {
for (int i = 10; i >= 1; i--) {
cout << i << endl;
}
return 0;
program 2:
int n = 20;
int suma = 0;
for (int i = 1; i <= n; i++) {
suma += i;
cout << suma << endl;
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2025 KUDO.TIPS - All rights reserved.
program 1:
#include <iostream>
using namespace std;
int main() {
for (int i = 10; i >= 1; i--) {
cout << i << endl;
}
return 0;
}
program 2:
#include <iostream>
using namespace std;
int main() {
int n = 20;
int suma = 0;
for (int i = 1; i <= n; i++) {
suma += i;
}
cout << suma << endl;
return 0;
}