// loop3.cpp // Test program showing a simple for loop // Illustrates compound statements in loop control // 1/28/03, Ray S. Babcock // #include using namespace std; int main(void) { // loop using compound statements in initialization // and update cout << "compound expression loop" << endl; for(int i=0, j=-4; i<5; i++, j--) cout << i << " " << j << endl; }