A unique square is a square number that equals the sum of the consecutive integers from 1 to n. For example, 36 is a unique square, since it is equal to both 6 x 6 and the sum 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8. Define a class of integers that has the methods isSquare and isUniqueSquare. Use that class in a program that displays the first m unique square numbers for a positive integer m, as entered by the user.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here