#include<stdio.h>
int Digits(int n)
{
int d=0;
while(n)
{
n/=10;
d++;
}
return d;
}
int Sum(int n)
{
int s=0;
while(n)
{
s+=n%10;
n/=10;
}
return s;
}
void Reverse(int n)
{
printf("%d",n%10);
n/=10;
if(n) Reverse(n);
}
int main()
{
int num;
printf("请输入:");
scanf("%d",&num);
printf("位数:%d\n",Digits(num));
printf("各位相加和:%d\n",Sum(num));
Reverse(num);
return 0;
}