APC-S-004.c
Problem Statement
APC-S-004.c
Program to print first 10 natural numbers using while loop.
Source Code
c
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int x;
x = 1;
while (x <= 10)
{
printf("%d ", x);
x++;
}
getch();
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
● Author - Amit Dutta · Updated - 12 Dec 2025