posted 19 years ago
That's a tough one (homework problem or not).
I don't think there's a simple way to do it. You'll have to go case-by-case. For example, 0-9 will be print "zero", "one", etcetera. 10-19 will be another case, 20-29, etcetera. As you add more cases you'll probably see ways to factor out general functions.
--Dave