Decimal number to Hexadecimal number by using Recursion

Problem with converting Decimal number to Hexadecimal number

Posted 28 January 2010 - 11:46 PM

hay
I am trying to write code for converting Decimal number to Hexadecimal number by using Recursion n I successfully did it.
But my out was printing more than once.
For example:
Enter Decimal Number :590
Hexadecimal Number :24E24E24E24E

but the output should be 24E,i dont understand why it was printing more then once
can an one help me
this is my code

The hex switch is long but it just converts the integer given to a string if anyone can come up with something simpilar than my switch I would appreciate it.. my problem is i can't convert the int to string cuz i can't find anything good enough on the interwebs anywhere... im looking for simple i havent used sstream