DO LOOP WHILE
DO LOOP WHILE
INPUT
#include <stdio.h>
int main()
{
int num, i=0;
printf("Enter a number\n");
scanf("%d", &num);
do
{
i=i+1;
printf("%d\n",i);
} while (i<num);
return 0;
}
OUTPUT
Enter a number
18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Comments
Post a Comment