CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
using namespace std;
int main() {
/* How can I add more variables to a for loop in C++?
I tried to add more variables to a for loop by this:
*/
for(int a = 10, b = 11; a != 0; a--, b++) {
cout<<a<<" "<<b<<endl;
}
/*
When i try to run it my compiler says, 'error: unqualified-id before 'int' '*/
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run