关于 OJ1575的参考题解

#include <stdio.h>
int main()
{
int a,b;
scanf("%d",&a);
b=0;
while(a)
{
b+=a%10;
a/=10;
}
printf("%d\n",b);
return 0;
}

posted @ 2016-05-28 15:58  Billw  阅读(155)  评论(0编辑  收藏  举报