函数int isPalm(long m)的功能是:将正整数m的各位数字取出存入数组中,然后判断其是否为回文数。若m是回文数则返回1,否则返回0。
include<stdlib.h>
int isPalm(long m)
{
int i=0, k=0;
char str[32];
while(m>0) {
str[k++]= _______ +'0';
m=m/10;
}
for(i=0; i<k/2; i++)
if(str[i]!=str _______ )return 0;
return 1;
}
int main( )
{
long n, a, t;
printf("input a positive integer: "); scanf("%ld", &n);
if(n<100||n>=1000)return -1;
while( _______ ) {
printf("%id->", n);
for(a=0, t=n; t>0; ){
a= _______ *10+t%10; t=t/10;
n= _______ ;
printf("%id/n", n);
system("pause"); return 0;