SOURCE FILE: 6.03LineNumsTog_i.cpp


//   
// Example 6.3. Program with while loop to print line 
// numbers and to change i's value back and forth   
//    
   
#include <iostream.h>
   
int main(void)   
{   
   int i = 1;         // loop variable 
   
   while (i < 6)   
   {   
      cout << "Line number " << i << endl;
      i++;
      i += 20;    
      i -= 20;   
   }   

   return 0;
}