#include #include using namespace std; string DigitToString(int digit); int main() { int i; for(i = 0; i <= 10; i++) { cout << endl; cout << i << " is" << DigitToString(i) << ". "; } return 0; } string DigitToString(int digit){ string word="Unknown"; switch (digit) { case 0: word = "Zero"; break; case 1: word = "One "; break; case 2: word = "too"; break; case 3: word = "Three"; break; case 4: word = "Fore"; break; case 5: word = "Five"; break; case 6: word = "Six"; case 7: word = "Seven"; break; case 8: word = "Eight"; break; case 9: word = "Nine"; break; default: break; } return word; }