It's not a secret anymore!
The moose likes Beginning Java and the fly likes Convert decimal number in words Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Convert decimal number in words" Watch "Convert decimal number in words" New topic

Convert decimal number in words

Vijay Chandran
Ranch Hand

Joined: Jan 07, 2007
Posts: 186

Dear friends,

I need an utility Java program that will convert a decimal number to wordings.

For ex.. 120.65 to be converted as one hundred and twenty point sixty five

Kindly provide your help.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15082

Is this a homework question? JavaRanch is not a code mill.

So, what have you tried yourself and where do you get stuck? With assignments like these, it helps to first think about the problem itself - describe in normal language how you would solve this. When you're clear about how you're going to do it, you can start thinking about writing Java code.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

This is also very much like the CattleDrive assignment 4a and 4b.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
John Abong
Ranch Hand

Joined: May 14, 2007
Posts: 79
I second that, Fred.
I agree. Here's the link:
subject: Convert decimal number in words
It's not a secret anymore!