using namespace std;
// Counting loop example.
cout << "How many? ";
cin >> cnt;
for(int i = 0; i < cnt; i++)
cout << "i = " << i << endl;
The for loop is also familiar from Java. It provides
an initialization, test and increment, and a body. These are nice
with arrays, which we will get to later.