#include main(){ int a,b,c,d,x; scanf("%d",&x); a=x%10; //个位数 b=x/10%10; //十位数 c=x/100; //百位数 d=a+b+c; //和 printf("%d",d);}