write a series program in Java : S= x!/1+(x+2)!/(1+2)+(x+4)!/(1+2+3)+....(10 terms)
Answers
Answer:
1+203+400 +2+3Is DD I have
Answer:
Java program to get the sum of the series
import java.io.*;
class MathSeries {
// Function to get the series
static double Series(double x, int n)
{
double sum = 1, term = 1, fct, j, y = 2, m;
// Sum of n-1 terms starting from 2nd term
int i;
for (i = 1; i < n; i++) {
fct = 1;
for (j = 1; j <= y; j++) {
fct = fct * j;
}
term = term * (-1);
m = Math.pow(x, y) / fct;
m = m * term;
sum = sum + m;
y += 2;
}
return sum;
}
// Driver Code
public static void main(String[] args)
{
double x = 3;
int n = 4;
System.out.println(Math.round(Series(x, n)
PLEASE MARK ME AS THE BRAINLIEST
AND FOLLOW GIVE THANKS AND VOTE 5 STARS
PLEASE
THE ANSWER ABOVE IS WRONG