Commit 8e685768 authored by User expired's avatar User expired
Browse files

fix is_square.mc

parent 0e6e92f6
......@@ -4,7 +4,7 @@ bool is_square(int n)
{
int i;
i = 0;
while(i*i < n){
while(i*i <= n){
if(i*i == n){
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment