| Author |
Converting numbers to word
|
namrata mahajan
Greenhorn
Joined: Jan 08, 2009
Posts: 6
|
|
Hii guys,
i am new to this forum. Can anybody give me an idea about how to convert a number into word e.g. if a number is 7932 then in word it will be seven thousand nine hundred and thirty two.
THANKS IN ADVANCE
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
Well I don't think there is no direct way to do this. You will have to write a small program that uses % 10 to extract the last digit, then according to the position of the digit, add hundred or thousand and then divide the number by 10 and then again uses %10.
This question is not related to SCJP so post it in the Java-General-beginner forum
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
 |
|
|
subject: Converting numbers to word
|
|
|