#include<stdio.h>
int main(void)
{
int sum=0,number,a;
printf("Enter a number:");
scanf("%d",&number);
while(number!=0){
a=number%10;
sum+=a;
number=number/10;
if(number==0)
printf("%d",a);
else
printf("%d+",a);
}
printf("=%d\n",sum);
return 0;
}
int main(void)
{
int sum=0,number,a;
printf("Enter a number:");
scanf("%d",&number);
while(number!=0){
a=number%10;
sum+=a;
number=number/10;
if(number==0)
printf("%d",a);
else
printf("%d+",a);
}
printf("=%d\n",sum);
return 0;
}
每一个不曾起舞的日子,都是对未来的一种辜负......