Scope of requirements questions:
1. Do you have to handle negative numbers?
2. What is the maximum number of decimal digits you have to support?
3. Do you have to support decimal fractions?
There are culture-specific variations, but the way I was taught to read numbers aloud is exemplified below:
224,224,224,224 =
two hundred twenty four billion,
two hundred twenty four million,
two hundred twenty four thousand,
two hundred twenty four
The same decoding algorithm is used for each triad. You should take advantage of that regularity.
Except for the special case when N==0, your number decoder function has to do the following for each nonzero triad:
> call the triad decoder
> append the suffix appropriate for that triad.
Your triad decode function can decode each decimal digit independently except when the two least significant digits are between 10 and 19.