123456789101112
int main() { int i = 0, j = 6; //while(i<3) for(i, j; i < 3; i++ && j--) { cout << "I = " << i << endl; cout << "J = " << j << endl; cout << "*****************" << endl; //++i && j--; } }
12345678910
I = 0 J = 6 ***************** I = 1 J = 6 ***************** I = 2 J = 5 *****************
for(i, j; i < 3; ++i && j--)
I = 0 J = 6 ***************** I = 1 J = 5 ***************** I = 2 J = 4 *****************
1234
for(; i < 3; ++i, --j) { //... }
i, j
if( something && something_else )