home *** CD-ROM | disk | FTP | other *** search
/ Sams Teach Yourself C in 21 Days (6th Edition) / STYC216E.ISO / mac / Examples / Day06 / forstate.c < prev    next >
C/C++ Source or Header  |  2002-04-14  |  243b  |  17 lines

  1. /* Demonstrates a simple for statement */
  2.  
  3. #include <stdio.h>
  4.  
  5. int count;
  6.  
  7. int main( void )
  8. {
  9.     /* Print the numbers 1 through 20 */
  10.  
  11.     for (count = 1; count <= 20; count++)
  12.         printf("%d\n", count);
  13.  
  14.     return 0;
  15. }
  16.  
  17.