Цикл for в С++
Цикл for в С++:
#include <iostream>
using namespace std;
int main() {
int x;
for (x=1; x<=10; x=x+1) cout << x << " "; // from 1 to 10
cout << " end " << x; // 11
return 0;
}
Оставить свой ответ:
Цикл for в С++:
#include <iostream>
using namespace std;
int main() {
int x;
for (x=1; x<=10; x=x+1) cout << x << " "; // from 1 to 10
cout << " end " << x; // 11
return 0;
}