#include
int main()
{ int num,a1,a2,a3,b1,b2,b3,b4,c1,c2,c3,c4,c5,d1,d2,d3,d4,d5,d6;
printf("输入数字为:");
scanf("%d",&num);
if(0{printf("该数字是一位数\n");
printf("打印的数字%d\n",num);
printf("倒序=%d\n",num);
}
else
if(10<=num && num<=99)
{printf("该数字是二位数\n");
a1=num/10;
a2=num%10;
a3=10*a2+a1;
printf("打印的数字是%d %d\n",a1,a2);
printf("倒序数是%d\n",a3);
}
else
if(100<=num && num<=999)
{printf("该数字是三位数\n");
b1=num/100;
b2=(num-b1*100)/10;
b3=(num-b1*100)%10;
b4=(100*b3+10*b2+b1);
printf("打印的数字是%d %d %d\n",b1,b2,b3);
printf("倒序数是%d\n",b4);
}
else
if(1000<=num && num<=9999)
{printf("该数字是四位数\n");
c1=num/1000;
c2=(num-c1*1000)/100;
c3=(num-c1*1000-c2*100)/10;
c4=(num-c1*1000-c2*100)%10;
c5=(c4*1000+c3*100+c2*10+c1);
printf("打印的数字是%d %d %d %d\n",c1,c2,c3,c4);
printf("倒序数是%d\n",c5);
}
else
if(10000<=num && num<=99999)
{printf("该数字是五位数\n");
d1=num/10000;
d2=(num-d1*10000)/1000;
d3=(num-d1*10000-d2*1000)/100;
d4=(num-d1*10000-d2*1000-d3*100)/10;
d5=(num-d1*10000-d2*1000-d3*100-d4*10)%10;
d6=d5*10000+d4*1000+d3*100+d2*10+d1;
printf("打印的数字是%d %d %d %d %d\n",d1,d2,d3,d4,d5);
printf("倒序数是%d\n",d6);
}
else
printf("输入数据错误");
return 0;
}