Menu
Question Index
...


Write a program to print all the perfect squares in the given range. Spaces between the numbers are important and they should be in one line. Use System.out.println or System.out.print for printing.

Input (Range) Printed Output
50 to 125 64 81 100 121
1 to 125 1 4 9 16 25 36 49 64 81 100 121
5000 to 5900 5041 5184 5329 5476 5625 5776

class PrintPerfectSquaresInTheGivenRange

{    public static void main(String s[])
    {
        int start = 50;
        int end = 125;
        
        printPerfectSquares(start, end);

    }


public static void printPerfectSquares(int start, int end)
{
//Write code here to print the perfect squares in the given range.
}
}

Doubts

Problems

Topic: Nested for Loop In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App