home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sams Teach Yourself C in 21 Days (6th Edition)
/
STYC216E.ISO
/
mac
/
Examples
/
Day06
/
whilest.c
< prev
Wrap
C/C++ Source or Header
|
2002-04-16
|
274b
|
21 lines
/* Demonstrates a simple while statement */
#include <stdio.h>
int count;
int main( void )
{
/* Print the numbers 1 through 20 */
count = 1;
while (count <= 20)
{
printf("%d\n", count);
count++;
}
return 0;
}