下次一定好好读题…
这种题竟然做了十分钟0.0
#include <bits/stdc++.h>
using namespace std;
string str[10]={"zero","one","two","three","four","five","six","seven","eight","nine"};
char n[110];
int main(void)
{
int sum=0;
stack<int> s;
scanf("%s",n);
for(int i=0;i<strlen(n);i++)
sum+=n[i]-'0';
if(sum==0) s.push(0);
while(sum!=0)
{
s.push(sum%10);
sum/=10;
}
while(!s.empty())
{
cout<<str[s.top()];
s.pop();
if(!s.empty()) cout<<" ";
}
}