hello guys i got a simple project but not that simple at the same time. lol The user needs to input a number such as : 512 and the code needs to output the number but in letters(five hundread and twelve). Any tips? :)
jhonnyboy
1
Junior Poster in Training
Recommended Answers
Jump to PostFirst figure out how you break the number into the respective single digits.
Then, how do you display the various combinations - be sure to account for the -teens and for zero values.
Jump to PostLet's look at a simple example of how you might do this. Imagine you were give the number 72061.
The first thing you should do is determine how many digits there are - in this case 5. Now, you can divide by 10^4 (10 to the power 4, 4 …
Jump to Postjhonnyboy, it will be better if you can try to write a program first then post your coding.
mahlerfive is right but another alternative way is to store the number the user input in string then you can get each digit in the string a lot more easier. After …
All 11 Replies
vmanes
1,165
Posting Virtuoso
mahlerfive
23
Junior Poster in Training
raul15791
27
Junior Poster
jhonnyboy
1
Junior Poster in Training
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
raul15791
27
Junior Poster
dougy83
74
Posting Whiz in Training
jhonnyboy
1
Junior Poster in Training
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
jhonnyboy
1
Junior Poster in Training
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.