13. Write a Java program to find and display the Sum of the given series
S=1+ (1*2)+(1*2*3)+---------------- to 10 terms.
Answers
Answered by
4
Answer:
public static void main(String[] args) {
Scanner scn=new Scanner(System.in);
int n=scn.nextInt(), sum=0;
for(int i=1; i<=n; i++) sum+=fact(i);
System.out.println(sum);
}
Hope it helps!
sowmya2186:
thanks
Similar questions