home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 258_01 / dowhile.c < prev    next >
Text File  |  1988-03-30  |  256b  |  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.