Run ID:84559

提交时间:2024-07-16 10:51:31

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