RPG Starter

by Falacy
An Open Source Demo/Game with everything you'll need to get started on your very own BYOND Game!
ID:292221
 
Falacy I need some help with my code for my programming class. I need to create a program where it converts whatever the number (integer) the user types in to string text form.

For example: The user types in 3452. The output should be three thousand four hundred and fifty two.

^^
And you're taking a DM class?
In response to Falacy
We're using Visual Basics currently. Also, DM?
In response to Oseliman
I don't know how to do that in VB
In response to Falacy
The code in DM seems really similar. Can you at least explain it out to me what you would do in DM?
In response to Oseliman
Convert the number to a string
Look at each "letter" from the string
Use an associative list to pull the value for that "letter" - so "3"="Three"
Use another associative list which checks the "depth" of the letter. So the 4th letter from the right would be 4="Thousand"
The 2nd & 5th (etc) digits would need a special associative list, instead of five it would need fifty and such
You would also need an extra check if the 2nd & 5th digits were a 1, since that would be a teen number or ten.
And another check to add the "and" if the number is >=100 so it says one hundred and fifty three.
You may need an extra check for 0s, since I'm not sure how VB handles null values in strings.
In response to Falacy
Thanks for taking the time to answer my question. I think I got it. :)
In response to Oseliman
You could also use the return value of a function call to get the "3" to "three" parts done.
In response to Falacy
Lol. I got in trouble for looking at this in class -__-. Anyways, the program was optional so I didn't finish it even if I could of. Thanks again though.