**makes face like a three year old** I ask for a program to convert a number to words. for ex. 12345 -> one two three four five.
**makes face like a three year old** I ask for a program to convert a number to words. for ex. 12345 -> one two three four five.
**Makes face like disappointed father** You should be ashamed for asking. I will not do your work for you. Do it yourself, however, and I will help you if get stuck.
how to separate digits from each other ? If I knew this, it would be easier for me to use if-elseif statements.Code:String[] words = {"One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Zero"} ;
Hint: 12345 % 10 == 5; 12345 / 10 == 1234
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
If you move "Zero" to the start of the array then you can index it more naturally. i.e. words[0] would evaluate to "Zero", etc.
In C the name of the type is char* not String
thank you , all