mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08: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;
|
|
}
|