wap to input a program .
find the sum of the series
1+(1*2)
+2+(1*2*3)+3(1*2*3*4)+.....upto n terms
don't spam it
Answers
Answered by
1
S= 1+(1*2)+2+(1*2*3)+3+(1*2*3*4)+.....+n(1*2*3*4*....*n)
import java.util.*;
public class series
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
int n,i,j,s=0,f;
System.out.println("Enter the limit:");
n= in.nextInt();
for(i=1;i<=n;i++)
{
f=1;
for(j=1;j<=i+1;j++)
f=f*j;
s=s+i+f;
}
System.out.println("Sum: "+s);
}
}
Hope it helps you...
Please mark it as brainliest...
Similar questions
Math,
5 months ago
Geography,
5 months ago
Computer Science,
10 months ago
Math,
1 year ago
Math,
1 year ago