I have this code and it works perfectly except Hex=0 doesn't work, i tried to add IF statement but it added 0 to all the 255 the outputs of Hex, can someone tell me what to do please. thanks
One problem that stood out even on looking at it at the first time is the switch has case 0 and yet the if statement makes that impossible.
I think you need to revisit your recursion and integrate a while statement instead of if to end the recursion. I suspect you need to incorporate both number/base as well as number%base.