I need help with writing a program for converting int numbers to words. For example, the number 713 would be translated into the string "seven hundred thirteen", and 8203 would be translated into "eight thousand two hundred three". The class should have a single integer member variable:
- int number;
- and static array of strings that specify how to translate into the desired format.
so far i have these arrays set up... not much code but I hope i´m off to a good start. I´m asking for maybe a an example code to help me get started. If possible can you keep it simple... I´m new and trying to teach myself C++.
char lessThan20[20][25] = {"zero", "one", ..., "eighteen", "nineteen"};
char hundred[] = "hundred";
char thousand[] = "thousand";