解题思路:不知道错哪了
注意事项:
参考代码:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
long long m;
int n,sum=0;
while(scanf("%d",&m)!=EOF)
{
while(m!=0)
{
n=m%10;
m=m/10;
sum=sum+n;
}
printf("%d",sum);
sum=0;
}
return 0;
}
0.0分
0 人评分