回复 4楼 wp231957
怎么会我改了一下
#include<stdio.h>
#include<math.h>
void main(){
unsigned __int64 num,sum=0,c=1;
int i,b;
int a[21];//类型原因,最大能到20位数!
printf("please input a number:");
scanf("%I64u",&num);
printf("input number is %I64u\n ",num);
if(num>=10){
for(i=0;num>=10;i++){
a[i]=num%10;
num/=10;
}
a[i]=num;
}
else
{
i=0;
a[i]=num;
}
for(b=i;b>=0;b--){
printf("%d\t",a[b]);
}
printf("\n");
for(b=i;b>=0;b--){
sum+=a[b]*c;c*=10;
}
printf("%I64u\n",sum);
}