Category Archives: SumThe Series

C Program Sum Factorial Series

C Program Sum Factorial Series /* C program to calculate and print sum of the series 1!+2!+3!+…+n! C program to print the sum of factorials of natural numbers from 1 to n. */ #include<stdio.h> int main() { int i,n,sum; long fact=1; printf(“Enter the value of n: “); scanf(“%d”,&n); sum=0; /* loop to calculate sum from… Read More »

 7,144 total views,  12 views today

C Program Sum Series N Natural Numbers

C Program Sum Series N Natural Numbers /* C program to calculate and print sum of the series 1+2+3+4+…+n C program to print the sum of all natural numbers from 1 to n. */ #include<stdio.h> int main() { int i,n,sum; printf(“Enter the value of n: “); scanf(“%d”,&n); sum=0; /* loop to calculate sum from 1… Read More »

 507 total views,  2 views today