Java Series Programs
Java Iterative Stmts
Write a program in Java to find the sum of the given series:
S = (a*2) + (a*3) + …… + (a*20)
View Answer13 Likes
Java Iterative Stmts
Write the program to find the sum of the following series:
S = a + a2 + a3 + ……. + an
View Answer39 Likes
Java Iterative Stmts
Write a program in Java to find the sum of the given series:
S = 1 + 22 / a + 33 / a2 + …… to n terms
View Answer27 Likes
Java Iterative Stmts
Write a program in Java to find the sum of the given series:
S = 12/a + 32 / a2 + 52 / a3 + …… to n terms
View Answer22 Likes
Java Iterative Stmts
Write a program in Java to find the sum of the given series:
S = 1/a + 1/a2 + 1/a3 + …… + 1/an
View Answer18 Likes
Java Iterative Stmts
Write a program in Java to find the sum of the given series:
S = x/2 + x/5 + x/8 + x/11 + …… + x/20
View Answer56 Likes
Java Iterative Stmts
Write a menu driven program to perform the following tasks by using Switch case statement:
(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)
View Answer174 Likes
Java Iterative Stmts
Using a switch statement, write a menu driven program to:
(a) Generate and display the first 10 terms of the Fibonacci series
0, 1, 1, 2, 3, 5
The first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two.
(b) Find the sum of the digits of an integer that is input.
Sample Input: 15390
Sample Output: Sum of the digits = 18For an incorrect choice, an appropriate error message should be displayed.
View Answer44 Likes
Java Nested for Loops
Write Java program to find the sum of the given series:
1 + (1/2!) + (1/3!) + (1/4!) + ………. + (1/n!)
View Answer61 Likes
Java Nested for Loops
Write Java program to find the sum of the given series:
1 + (1+2) + (1+2+3) + ………. + (1+2+3+ …… + n)
View Answer18 Likes
Showing 31 - 40 of 63 Questions