SOURCE FILE: 01LineNumbers.cpp


/* Program to print line numbers with a for loop */
   
#include <iostream>
#include <iomanip>

using namespace std ;
   
int main(void)   
{   
   const int MAX_INDEX = 10;  
   int i;      // index 
   
   for (i = 1; i <= MAX_INDEX; i++)    
      cout << "This is line " << setw(2) << i << endl;
   
   return 0;
}