题目
中文翻译
代码
#include <iostream>
#include <string>
using namespace std;
int main()
{
string n;
cin >> n;
int s = 0;
for (auto c : n) s += c - '0';
char word[10][10] = {"zero","one","two","three","four","five","six","seven","eight","nine"};
string str = to_string(s);
cout << word[str[0] - '0'];
for (int i = 1; i < str.size(); i++)
{
cout << ' ' << word[str[i] - '0'];
}
cout<<endl;
return 0;
}