Using switch statement, write a menu-driven program in Java for the following:
i. To find the sum of the following series:
Sum = a + a3 + a5 + a7 + ---------- to an
ii. To display the first ten terms of the given series:
0,3,8,15, …..
Answers
Answered by
0
Answer:
(a) To print the series:
0, 3, 8, 15, 24, ………… to n terms. (value of 'n' is to be an input by the user)
(b) To find the sum of the series:
S = (1/2) + (3/4) + (5/6) + (7/8) + ……….. + (19/20)
Similar questions
Math,
10 hours ago
India Languages,
10 hours ago
Math,
10 hours ago
Computer Science,
19 hours ago
Math,
19 hours ago
Math,
8 months ago
Science,
8 months ago
Math,
8 months ago