Java Series Programs
Java Iterative Stmts
Write a program in Java to display the first 10 terms of the following series:
10, 20, 30, 40, ……..
View Answer1 Likes
Java Iterative Stmts
Write the program in Java to display the first ten terms of the following series:
1, 4, 9, 16,
View Answer3 Likes
Java Iterative Stmts
Write a program in Java to find the sum of the given series:
S = a2 + a2 / 2 + a2 / 3 + …… + a2 / 10
View Answer2 Likes
Java Iterative Stmts
Write a program in Java to find the sum of the given series:
S = a + a2 / 2 + a3 / 3 + …… + a10 / 10
View Answer3 Likes
Java Iterative Stmts
Using switch statement, write a menu driven program for the following:
(a) To find and display the sum of the series given below:
S = x1 - x2 + x3 - x4 + x5 - ………… - x20; where x = 2
(b) To display the series:
1, 11, 111, 1111, 11111
For an incorrect option, an appropriate error message should be displayed.
View Answer1 Likes
Java Iterative Stmts
Write the program in Java to display the first ten terms of the following series:
1, 2, 4, 7, 11,
View Answer1 Likes
Java Nested for Loops
Write a program to compute and display the sum of the following series:
S = (1 + 2) / (1 * 2) + (1 + 2 + 3) / (1 * 2 * 3) + -------- + (1 + 2 + 3 + ----- + n ) / (1 * 2 * 3 * ----- * n)
View Answer1 Likes
Java Nested for Loops
Write a program in Java to input the values of x and n and print the sum of the following series:
S = 1 + (x+2)/2! + (2x+3)/3! + (3x+4)/4! + ……… to n terms
View Answer1 Likes
Java Iterative Stmts
Write a program in Java to print the following series:
3, 6, 12, 24, 48, ….. to n
View Answer3 Likes
Java User Defined Methods
Design a class to overload a function series( ) as follows:
(a) void series (int x, int n) – To display the sum of the series given below:
x1 + x2 + x3 + ………. xn terms
(b) void series (int p) – To display the following series:
0, 7, 26, 63 ………. p terms
(c) void series () – To display the sum of the series given below:
1/2 + 1/3 + 1/4 + ………. 1/10
View Answer4 Likes
Showing 1 - 10 of 59 Questions