mirror of
https://github.com/TheAlgorithms/C
synced 2025-04-23 05:52:21 +03:00
8 lines
143 B
C
8 lines
143 B
C
bool isPerfectSquare(int num)
|
|
{
|
|
for (long i = 1; i * i <= num; i++)
|
|
if (i * i == num)
|
|
return true;
|
|
return false;
|
|
}
|