+ 1
Write a program to find the sum of this series with java ....S=1!+2!+3!+4!+.........N!
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 š
0
You mean add 1+2+3+4... up to N (input)?
0
Or are you taking about the factorial operator?
0
(N! * (N+1)!)/2 the factorial operator is easy to implement