Computing.Net > Forums > Programming > Need help in java

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Need help in java

Reply to Message Icon

Name: drc--ro-w
Date: October 3, 2003 at 23:51:57 Pacific
OS: Windows XP (Home)
CPU/Ram: Intel Mobile Pentium IV 1
Comment:

i want to write a simple algorithm in java.. but i'm still not getting the idea how to do it.. i want to write a program that can convert a number into word form i.e Input: 123 Output: One Hundread and twenty three, can anyone help me to find a solution for this problem.. thnx



Sponsored Link
Ads by Google

Response Number 1
Name: Dr. Nick
Date: October 4, 2003 at 22:02:01 Pacific
Reply:

Hmmm, sounds like homework to me.

You'll find that few people here will help you unless you make an attempt first.

http://www.computing.net/programming/wwwboard/forum/7407.html


0

Response Number 2
Name: sadaam
Date: October 5, 2003 at 00:27:24 Pacific
Reply:

let me see..........

i will provide you with some pseudocode. the rest is yours!

create an array with numbers from 1-9.
create another array with the the alphabetic form
example. "one", "two", "three" make sure they are in order. try subscripts if you are adventurous.
then when you enter the numbers use them as reference in the array.
i hope you are creating a normal program not a GUI.

good luck - saddam.


0

Response Number 3
Name: Infinite Recursion
Date: October 6, 2003 at 13:09:40 Pacific
Reply:

From the famous words of eaw8806...
REMEMBER 7407!!!

Please have a look at the thread below:
Date: August 06, 2003 at 10:20:46 Pacific
Subject: Have a homework question???
http://www.computing.net/programming/wwwboard/forum/7407.html
(Thanks for posting the reminder of this thread Dr. Nick)

At any rate, the simple solution would be to have a character array with an integer index used as a cross reference...

string myArray[10000];
myArray[1] = "one";
...
myArray[100] = "One Hundred";
...
myArray[241] = "Two Hundred Fourty One";
...

Try it.

IR



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Need help in java

Help in JAVA program www.computing.net/answers/programming/help-in-java-program/85.html

if u Need help in VB email me www.computing.net/answers/programming/if-u-need-help-in-vb-email-me/1201.html

I need help in Java www.computing.net/answers/programming/i-need-help-in-java/7027.html