C program to print 1 to 20 using exit control loop
Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1;
clrscr();
do
{
printf("%d\n",i);
i++;
}
while(i<=20);
getch();
}
Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1;
clrscr();
do
{
printf("%d\n",i);
i++;
}
while(i<=20);
getch();
}
Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Great👌🏻👌🏻
ReplyDelete