A new problem for the day.
program input :
1,291
program output:
"one thousand two hundred and ninety one"
Basically pick out the number in the form 1 x 10^3 + 2 x 10^2 + 9 x 10 + 1,
have this as a list, and switch each element with the text required.
Remember that the tenth place should have a different set (twenty,thrity etc) and that 11 to 19 are another list again.
Sometimes you just need to hard-code
p.s.: I will post the code as a comment.
Posted
01-05-2005 11:04 PM
by
rsakalley