Words to Numbers
For this assignment we are going back to a text based interface. Read a list of integer numbers from the standard input until end of file is encountered. As each number is read, the textual representation of the number is printed. The numbers must be in the range of Java integers (-2147483648 to 2147483647). Here are some examples of what I mean by textual names: zero, negative three, two billion one hundred forty seven million four hundred eighty three thousand six hundred forty seven.
To convert a number to a string is pretty easy, if you think recursively. Here are some hints:
You MUST solve this problem recursively. (Actually, you would be silly not to).
Here is an interesting question. If all the names for the legal Java integers were listed in a dictionary, which would be the first entry? What would be the last entry? What entry would have the most characters? Useless brownie points for the first people to come up with the answers to these questions.