Computer Science, asked by selvaganesh79, 8 days ago

write a java program to find the value of s s=1 +1+2/1*2 + 1+2+3/1*2*3 +1+2+3+4 /1*2*3*4 + …………………………………..1+2+3+4+………..n /1*2*3*4*………….n

Answers

Answered by TYKE
1

import java.util.*;

class GFG {

// Function to find sum of given series

static int sum Of series(int n)

{

int sum = 0;

for (int i = 1 ; i <= n ; i++)

for (int j = 1 ; j <= i ; j++)

sum += j;

return sum;

}

/* Driver program to test above function */

public static void main(String[] args)

{

int n = 10;

System.out.println(sumOfSeries(n));

}

}

Answered by barani79530
0

Explanation:

2+3+6+9

please mark as best answer and thank me

Similar questions