Well, itβs not difficult to do for integers, but the task is more complicated for floating point numbers, and someone has already placed a pointer to explain this. For integers, you can do something like this:
void iprint(int n) { if( n > 9 ) { int a = n / 10; n -= 10 * a; iprint(a); } putchar('0'+n); }
swestrup
source share