Computer Applications
Write the program in Java to display the first ten terms of the following series:
24, 99, 224, 399,
Java
Java Iterative Stmts
54 Likes
Answer
public class KboatSeries
{
public static void main(String args[]) {
for (int i = 5; i <= 50; i = i + 5) {
int term = (int)(Math.pow(i, 2) - 1);
System.out.print(term + " ");
}
}
}
Variable Description Table
Program Explanation
Output
Answered By
25 Likes
Related Questions
Write the program in Java to display the first ten terms of the following series:
4, 16, 36, 64,
Write the program in Java to display the first ten terms of the following series:
0, 3, 8, 15,
Write a program to input any 50 numbers (including positive and negative). Perform the following tasks:
(a) Count the positive numbers
(b) Count the negative numbers
(c) Sum of positive numbers
(d) Sum of negative numbers
Write the program in Java to display the first ten terms of the following series:
2, 5, 10, 17,