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