海阔天空 • 3天前
using namespace std;
int main() {
int i, s = 0; cin >> i; while (i) { s = s + i % 10; i = i / 10; } cout << s; return 0;
}
评论:
请先登录,才能进行评论