[color=Black][size=1]This is my first post so if I do something wrong let me know.I am reading the book practical C++ programming and having problems getting started with one of the practice problems. The problem says to take a number entered by the user and then convert it into words and print it to the screen.
I have the knowledge of how to take input from a user and print it to the screen but for some reason I can't seem to figure out how I would go out changing the number into text. Would I use and array, a string, or something else.
I just need a push in the right direction I don't want someone to write the program for me I have like coders block? haha Idk.
Anyhow any help would be appreiciated. [/size][/color]
Comments
But i think you overrated the problem, there is nothing unusual in the question since YOU will be the one writing the "words" like "one" "two" "three". And "somehow", you will tell the computer "if you see the number 1; printf the word 'one', if you see the number 2, printf the word 'two' etc.", got me?
But i think you overrated the problem, there is nothing unusual in the question since YOU will be the one writing the "words" like "one" "two" "three". And "somehow", you will tell the computer "if you see the number 1; printf the word 'one', if you see the number 2, printf the word 'two' etc.", got me?
Example website Numbers to Words try in History Number dot Com
[link=http://www.historynumber.com/]www.historynumber.com/[/link]