Monday, 25 February 2013

Print numbers from 1 to 10 using for loop


   #include<stdio.h>
 #include<conio.h>
 void main()
 {
 int i;
 clrscr();
 for(i=1;i<=10;i++)
 printf("%d\n",i);
 getch();
 }

Output
1
2
3
4
5
6
7
8
9
10

No comments:

Post a Comment