Class AT
{
had main ()
o
int n=bi 3;
do
ह
nan lio
} whiler En! =0);
System.out.println (n);
}
Answers
Answered by
1
Answer:
here is the answer it may help u
Explanation:
import java.util.Scanner;
public class KboatSeries
{
public void computeSum() {
Scanner in = new Scanner(System.in);
System.out.print("Enter n: ");
int n = in.nextInt();
double sum = 0.0;
for (int i = 1, j = 1; i <= n; i++, j = j + 2) {
double f = 1;
for (int k = 1; k <= i; k++) {
f *= k;
}
sum += j / f;
}
System.out.println("Sum=" + sum);
}
}
Output
BlueJ output of KboatSeries.java
Similar questions
Math,
2 months ago
Social Sciences,
2 months ago
Social Sciences,
2 months ago
English,
5 months ago
Physics,
10 months ago
Biology,
10 months ago
English,
10 months ago