// Fig. 2.17: fig02_17.cpp // Counter-controlled repetition with the for structure. #include using std::cout; using std::endl; // function main begins program execution int main() { // Initialization, repetition condition and incrementing // are all included in the for structure header. for ( int counter = 1; counter <= 10; counter++ ) cout << counter << endl; return 0; // indicate successful termination } // end function main