C program to find sum of series 1!+2!+3!+4!+……..+n!

find sum of series 1!+2!+3!+4!+........+n!

/* This program find sum of series 1!+2!+3!+4!+……..+n!  without using function */

Note: Program Compiled in Dev C++ compiler.

OUTPUT:

Description:

  • Variable num is used for the storing last element of the series. i & j are used for iteration purpose in loop.fact is used for finding the factorial of each element. Finally sum will store the sum of series 1!+2!+3!+4!+……..+n!.
  • Here two for loops are used. First loop is used for iteration so that each element can be traversed.
  • Another loop is used for finding the factorial of each loop.Finally after calculating factorial of element it is added to sum.
  • Finally factorial of element is added with sum.

 

“Program to find sum of series 1!+2!+3!+4!+……..+n! using function.”

OUTPUT:

Finally you also learned how to find sum using function.So I hope you can solve related programs.

Free online test powered by Quick Solution.

C programming Videos by Quick Solution.

Click here to go program gallery.


Moto Z play white (32 GB).




 

2 thoughts on “C program to find sum of series 1!+2!+3!+4!+……..+n!”

Leave a Reply