home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / open / tur-c-tu.lzh / SOURCE.ZIP / DOWHILE.C < prev    next >
C/C++ Source or Header  |  1988-02-01  |  248b  |  14 lines

  1.                                           /* Chapter 3 - Program 2 */
  2. /* This is an example of a do-while loop */
  3.  
  4. main()
  5. {
  6. int i;
  7.  
  8.    i = 0;
  9.    do {
  10.       printf("The value of i is now %d\n",i);
  11.       i = i + 1;
  12.    } while (i < 5);
  13. }
  14.