So I\'ve been working my way through Kochan\'s Programming in C and I\'ve hit a snag on one of the questions which reads as follows:
\"Write a program that takes an
My simple answer:
void printNum(int x) { static const char * const num[] = { "zero ", "one ", "two " , "three ", "four ", "five ", "six ", "seven ", "eight ", "nine " }; if (x < 10) { printf(num[x]); return; } printNum(x / 10); printNum(x % 10); }