PAT A 1005
/*
没必要数组保存,直接getchar
然后转化成英文就好了
*/
#include<cstdio>
#include<string>
using namespace std;
int main()
{
int c;
int sum = 0;
char EngNum[10][10] = {"zero","one","two","three","four","five","six","seven","eight","nine"};
while((c=getchar())!='\n')
sum += c-'0';
string str = to_string(sum);
int len = str.length();
for(int i = 0; i<len; ++i)
{
if(i!=0)
printf(" ");
printf("%s",EngNum[str[i]-'0']);
}
printf("\n");
return 0;
}