This C Program calculates the Sum of Series 1/1! + 2/2! + 3/3! + ……1/N!.

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!`

`*/`

`#include <stdio.h>`

double sumseries(double);

main()

`{`

double number,sum;

printf("\n Enter the value: ");

scanf("%lf", &number);

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);

`}`

return(sum2);

`}`

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.**

Here’s the list of Best Reference Books in C Programming, Data-Structures and Algorithms

If you wish to look at other example programs on Mathematical Functions, go to C Programming Examples on Mathematical Functions. If you wish to look at programming examples on all topics, go to C Programming Examples.

» Next Page - C Program to Find 2 Elements in the Array such that Difference between them is Largest