public static void Main()
bool test1 = IsPerfectSquare(1);
Console.WriteLine("Is 1 a square number: " + test1);
bool test2 = IsPerfectSquare(3);
Console.WriteLine("Is 3 a square number: " + test1);
bool test3 = IsPerfectSquare(9);
Console.WriteLine("Is 9 a square number: " + test1);
bool test4 = IsPerfectSquare(25);
Console.WriteLine("Is 25 a square number: " + test1);
bool test5 = IsPerfectSquare(89);
Console.WriteLine("Is 89 a square number: " + test1);
public static bool IsPerfectSquare(int x)
for (int i = 1; i * i <= x; ++i)
Console.WriteLine(" " + x + " is the square number of " + i);