Home
User Guide
DB Recovery
Download
Documents
FAQ
Books
About Me
C Programs
Stats

/* Program# 46
   date : 28-12-2008
   while loop-print 1 to 10 
*/

#include <stdio.h>
main(){
int n;
n=1;
while(n<=10){
printf("\n %d",n);
n=n+1;
}
}


output:
To compile the program, run the gcc command,
$ gcc p46.c  
Now the executable file is stored as a.out, to run
the program,

$ ./a.out

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 
 $ 







Powered by
Open Source Programmers