Write a program to accept limit of series (n). Calculate and print
sum of the following series
S= 2 + 3 + 4+ 4+ 6 + 8 + 6 +9+ 12……….. n terms
If you can give the result in Scanner class, it will be much appreciated!!
And I will also mark you as Brainliest!!
Answers
Answered by
0
Answer:
Input: a = 3, n = 3
Output: 0.6666667
The series is 1/3 + 1/9 + 1/27 which is
equal to 0.6666667
Input: a = 5, n = 4
Output: 0.31039998
Similar questions