c语言大神帮我看看,为什么结果输出不对,输入27638496,要求结果64862#include<stdio.h>
unsigned long get_even(unsigned long n)
{unsigned long x=0;
int t;
while(n)
{t=n%10;
if(t%2==0)
x=x*10+t;
n=n/10;
}
return x;
}
int main()
{unsigned long n=-1;
while(n>99999999||n<0)
{ printf("请输入一个无符号整数,范围:(0<n<100000000):");
scanf("%1d",&n);
}
printf("\nThe result is:%1d\n",get_even(n));
}