忘记这种写法了,string arr[10] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
//#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
using namespace std;
int main()
{
//freopen("input.txt","r", stdin);
string sn;
cin >> sn;
int sum = 0;
for (int i = 0; i < (int)sn.length(); i++)
sum += (int)(sn[i]-'0');
string sSum = to_string(sum);
for (int j = 0; j < (int)sSum.length(); j++)
{
switch (sSum[j])
{
case '0':cout << "zero"; break;
case '1':cout << "one"; break;
case '2':cout << "two"; break;
case '3':cout << "three"; break;
case '4':cout << "four"; break;
case '5':cout << "five"; break;
case '6':cout << "six"; break;
case '7':cout << "seven"; break;
case '8':cout << "eight"; break;
case '9':cout << "nine"; break;
}
if (j == (int)sSum.length() - 1) continue;
cout << " ";
}
return 0;
}