#include
void main(){
int a,n,k,m=0,num=0;
scanf("%d",&n);
if(n<=10||n>=1000)
printf("Input error!");
else
{
k=n;
while(k)
{m=m*10+k%10;k/=10;num++;}
}
a=m;
printf("%d是%d位数\n",n,num);
while(a)
{printf("%d ",a%10);a/=10;}
m==n?printf("\nYes"):printf("\nNo");
}
运行示例: