PTA用C语言使用函数判断完全平方数,为什么我输入100输出NO?

我写的程序:
#include
int IsSquare( int n ){
int i;
for(i=1;i<=pow(2,32);i++){
if(i*i==n){
return 1;
}
else{
return 0;
}

}

}

img

img

int IsSquare( int n ){
int i=1;
while(i*i<=n)
{
    if(i*i == n)
        return 1;
    i++;
}
return 0;
}