Wrong Answer
代码
#include <stdio.h>
#include <math.h>
int main()
{
int a,b,c,d;
int count = 1;
printf("请输入一个不多于5位的正整数:");
scanf("%d",&a);
c = a;
printf("逆序:");
while(c / 10 != 0)
{
count++;
b = c % 10;
printf("%d",b);
c = c / 10;
}
b = c % 10;
printf("%d\n",b);
printf("位数是:%d\n",count);
printf("各位数字分别为:");
while(a % 10 != 0)
{
d = a / (int)pow(10,(count-1));
printf("%d ",d);
a = a % (int)pow(10,count-1);
count--;
}
return 0;
}