Do while Program

#include <iostream.h>

 int main()
 {
 int counter = 1;
 do {
 cout << counter << " ";
 } while ( ++counter <= 10 );
 cout << endl;
 return 0;
 }

  OUTPUT:  1 2 3 4 5 6 7 8 9 10

No comments:

Post a Comment