#include<stdio.h>
#include<stdlib.h>
int main()
{
int i, k, t, m, n = 0;
int a[5];
scanf("%d", &i);//输入5位以下的数字
k = i; m = i;
while (i>0)
{
n++;
i /= 10;
}
printf("%d\n", n);
//输出数字共几位
for (t=0 ; t<n ; t++ )
{
a[t] = m % 10;
m /= 10;
}
for (t = n-1; t >= 0; t--)
{
printf("%d",a[t]);
while (t != 0)
{
printf(" ");
break;
}
}
printf("\n");
//顺序输出每一位数字
while (k>0)
{
t = k % 10;
printf("%d", t);
k /= 10;
}
//逆序输出数字
system("pause");
return 0;
}
0.0分
2 人评分