source file name: While1.C
void main()
{
int n;
clrscr();
printf(" To display numbers 1 to to 10: ");
n=1; // start
while(n<=10) // end
{
printf("\n %d ",n); // body
n++; // interval
}
getch();
}
output:
source file name: While1.C
void main()
{
int n;
clrscr();
printf(" To display numbers 1 to to 10: ");
n=1; // start
while(n<=10) // end
{
printf("\n %d ",n); // body
n++; // interval
}
getch();
}
output:
0 Comments
Post a Comment