write a switch -case statement
String result ="";
case 0: result+="zero";break;
case 1: result+="one"; break;
............................
case 19: result+="nineteen";break;
case 20: result+="twenty"; break;
case 30: result+="thirty";break;
case 40: result+="forty"; break;
..............................
case 100: result+="hundred";break;
case 1000: result+="thousan"; break;
and so on