#include using namespace std; int main() { int i; // for ( initialize ; comparison ; increment ) // statement ; for ( i = 0 ; i < 10 ; i++ ) cout << "Loop counter: " << i << endl; // the above for loop is the same as the following while loop i = 0; while ( i < 10 ) { cout << "Loop counter: " << i << endl; i++; } // if you want to write an infinite loop // // for ( ; ; ) // statement ; // // while ( true )) // statement ; }