This is a for loop program in which we will find the sum of first 10 natural numbers with the help of the C Programming language.
#include <stdio.h>
int main()
{
int i, sum = 0;
for (i = 1; i <= 10; i++)
{
sum = sum + i;
}
printf("Sum of 10 number is:- %d", sum);
return 0;
}
//......Coded by YASH ALAPURIA
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP