Here's an idea:
First check is your number teen, or not.
If it is teen number (1 is first digit) then check second digit and write:
//just for example
case 1: str = "Eleven"; break;
case 2: str = "Twelve"; break;
//...
if it's not teen number, then you have to check first digit and make str = "Fifty", or str = "Ninety", etc.
Then check second digit and add to str:
str += "Two", str+="Three", and so on...
HTH