I had to write that code for a payroll program.
This should get you started:
Convert the Amount to a string, then group in three's from the decimal going
left - I called them 'chunks'
A couple of arrays for words
from "one" thru "nineteen"
and
from "twenty" thru "ninety" (by tens)
then look at the first 2 digits of each group - and go from there.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.