#include <iostream>
#include <string>
using namespace std;

int stringToNum(string num1){
   if(num1 == "one")
       return 1;
   else if(num1 == "two")
       return 2;
   else if(num1 == "three")
       return 3;
   else if(num1 == "four")
       return 4;
   else if(num1 == "five")
       return 5;
}

string numToString(int num){
   string n="";
   if(num<0){
       n = "negative ";
       num = -num;
   }
   if(num==0)
       n = n+"zero";
   else if(num==1)
       n = n+"one";
   else if(num==2)
       n = n+"two";
   else if(num==3)
       n = n+"three";
   else if(num==4)
       n = n+"four";
   else if(num==5)
       n = n+"five";
   else if(num==6)
       n = n+"six";
   else if(num==7)
       n = n+"seven";
   else if(num==8)
       n = n+"eight";
   else if(num==9)
       n = n+"nine";
   else
       n = n+"ten";
   return n;
}

int main(){
   string num1, num2, oper;
   cout<<"What is: ";
   cin>>num1>>oper>>num2;
   int n1 = stringToNum(num1);
   int n2 = stringToNum(num2);
   cout<<"Answer: "<<num1<<" "<<oper<<" "<<num2<<" is ";
   if(oper=="plus")
           cout<<numToString(n1+n2);
   else if(oper=="minus")
           cout<<numToString(n1-n2);
   cout<<"\n";
}
