home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap04 / forloop.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-05  |  282 b   |  16 lines

  1.  
  2. /* FORLOOP.C -- a simple for loop that   */
  3. /*              counts to ten            */
  4.  
  5. main()
  6. {
  7.     int i;
  8.     for (i = 1; i <= 10; i++)
  9.         {
  10.         printf("%d\n",i);  /* body of loop */
  11.         }
  12.     printf("All done!\n");
  13.     /* executed when i > 10 */
  14. }
  15.  
  16.