ysh

杨书蘅  •  6个月前


include <bits/stdc++.h>

using namespace std;

int main() {

int a, b, d = 0;
scanf("%d", &a);
while (a != 0) {
	b = a % 10;
	d = d + b;
	a = a / 10;
}
printf("%d", d);
return 0;

}


评论:

请先登录,才能进行评论