+ 1

Write a program to find the sum of this series with java ....S=1!+2!+3!+4!+.........N!

15th Mar 2018, 7:50 PM
Devansh Gupta
Devansh Gupta - avatar
4 Answers
+ 13
int sum=0; just make method to return factorial of a number , then run a loop from n=1 to n=n do sum+=factorial(n); in each iteration of loop //after the loop print value of sum //thats the first thing comes in every1's mind after seeing series type of questions 👍
18th Mar 2018, 5:42 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
0
You mean add 1+2+3+4... up to N (input)?
15th Mar 2018, 8:42 PM
TurtleShell
TurtleShell - avatar
0
Or are you taking about the factorial operator?
15th Mar 2018, 9:11 PM
Ariela
Ariela - avatar
0
(N! * (N+1)!)/2 the factorial operator is easy to implement
15th Mar 2018, 10:05 PM
Leonardo Medai Cossutta
Leonardo Medai Cossutta - avatar