1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include
intmain()
{
chardigtal[20];
intcount = 0;
inti;
intnum;
scanf("%d",&num);
while( num )
{
digtal[count]= num % 10;
num /= 10;
count ++;
}
printf("输入%d, 共%d位\n", num,count);
for(i = count - 1; i >= 0 ; i--)
printf("%d",digtal[i]);
return0;
}