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