Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

number to words

807598Jun 27 2006 — edited Jun 27 2006
Hi can anybody help here with a simple way to convert numbers to words.
It is intended to work as a (Check Writer).
1. Accept a double between 0-999999.99.
2. It should truncate the extra pennies.
3. then take it through another method to convert the integers for every thousand, hundred, and cents to words. Using simple (if statement or switch).

I have gotten through some of my setup but couldn't figure out how to exactly separate the hundreds and the thousands and assign to strings then call them from main. Also how to handel special cases like (one dollar), (one cent) and plural dollars vs. single dollar and cent. I have looked some samples on the net. But they could be much of help. They tended to be little bit complicated (for me at this stage).
Any help would be appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2006
Added on Jun 27 2006
7 comments
222 views