/* ECP: FILEname=fig11_3.c */ /* 1*/ /* Print N In Any Base */ /* 2*/ /* Assumes 2 <= Base <= 16 */ /* 3*/ void /* 4*/ PrintInt( unsigned int N, unsigned int Base ) /* 5*/ { /* 6*/ static char DigitTable[ ] = "0123456789abcdef"; /* 7*/ if( N >= Base ) /* 8*/ PrintInt( N / Base, Base ); /* 9*/ putchar( DigitTable[ N % Base ] ); /*10*/ }