Alejandro Loaiza wrote:would applying switches to teenWord() and tensWord() still be beneficial?
No, and you're concentrating too much on
code. So:
StopCoding (←click).
My advice: Take several two- and three-digit numbers at random, write them out, and
really look at them hard. What do they have in common? What
don't they?
You're
some way towards a solution, but you're not there yet; and some of what you have is using "brute force" rather than rational logic. There's nothing wrong with that as a 'first cut'; but I suspect you'll work out that there are ways to reduce the number of strings you actually need to do the job.
This is NOT a simple problem, so you really need to think
before you code.
HIH
Winston