Given a non-negative integer n, your task is to compute the sum of the digits of N, and output every digit of the sum In 中文版.
Input Specification:
Each input file contains the one test case. Each case occupies one line which contains an N (<= 10100).
Output Specification:
For all test case, output in one line the digits of the sum in 中文版 words. There must be one space between-consecutive words, but no extra space at the end of a line.
Sample Input:
12345
Sample Output:
One five
/*water .*/#include"iostream"#include"CString"#include"Stack"using namespacestd;Charnum[Ten][6] = {"Zero"," One"," Both","three"," Four","Five","Six","Seven","Eight","Nine" };intMain () {stack<int>s; Charstr[101]; intsum =0; CIN>>str; for(inti =0; I < strlen (str); i++) {sum+ = Str[i]-'0'; } if(Sum = =0) {cout<<"Zero"<<Endl; return 0; } while(Sum! =0) {s.push (sum%Ten); Sum/=Ten; } intK =1; while(!S.empty ()) { if(k = =1) cout<<num[s.top ()]; Elsecout<<" "<<num[s.top ()]; S.pop (); K++; } cout<<Endl; return 0;}
1005. Spell It Right (20)