APC-S-007.c
Problem Statement
APC-S-007.c
Write a program the sum of first 10 natural numbers.
Source Code
c
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int i, sum = 0;
for (i = 1; i <= 10; i++)
{
sum += i;
}
printf("\nSum of the first natural number : %d", sum);
getch();
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
● Author - Amit Dutta · Updated - 12 Dec 2025