if(1==huiwen(sum))这为啥没有被调用?没有输出语句?如何进行改动?
#include <stdio.h>#include "stdlib.h"
int main()
{
int huiwen(int num);
int sum,count,i;
count=0;
printf("1~200回文数有:\n");
for(i=1;i<=200;i++)
{
sum=i*i;
if(1==huiwen(sum))
{
count++;
printf("%-4d\n",sum);
if(count%5==0)
printf("\n");
system("pause");
}
}
return 0;
}
int huiwen(int num)
{
int result,tmp,x,mun;
result=0;
x=num;
while(x)
{
tmp=x%10;
mun=mun*10+tmp;
x=x/10;
}
if(num==mun)
result=1;
return result;
}