1002 写出这个数
水题。
#include"iostream" using namespace std; string s[11] = {"ling","yi","er","san","si","wu","liu","qi","ba","jiu"}; int main() { int ans = 0; string str; cin>>str; for(int i = 0 ; i < str.length(); ++i) ans += str[i]-'0'; str = to_string(ans); for(int i = 0; i < str.length(); ++i) { cout<<s[str[i]-'0']; if( i < str.length()-1) cout<<" "; } return 0; }