Run ID:84556

提交时间:2024-07-16 10:46:45

#include<iostream> using namespace std; int main(){ int z,b=0; cin>>z; do{ b = b+z%10; z=z/10; }while(z!=0); cout<<b; return 0; }