Here is source code of the C Program to Find the Sum of Series 1/1! + 2/2! + 3/3! + ……1/N!. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
* C Program to Find find Sum of the Series 1/1! + 2/2! + 3/3! + ……1/N!
printf("\n Enter the value: ");
sum = sumseries(number);
printf("\n Sum of the above series = %lf ", sum);
double sumseries(double m)
double sum2 = 0, f = 1, i;
for (i = 1; i <= m; i++)
f = f * i;
sum2 = sum2 +(i / f);
Output: $ cc pgm20.c $ a.out Enter the value: 5 Sum of the above series = 2.708333
Sanfoundry Global Education & Learning Series – 1000 C Programs.