Computer Applications

Write a program to display the first ten terms of the series:

5, 10, 17, --------------

Java

Java Iterative Stmts

48 Likes

Answer

public class KboatSeries
{
    public static void main(String args[]) {
        for (int i = 2; i <= 11; i++) {
            System.out.print((i * i + 1) + " ");
        }
    }
}

Variable Description Table

Program Explanation

Output

Answered By

23 Likes


Related Questions