How can I convert a number contained in a string from any base to any other base?
Bases can be anything i.e.: 2, 16, 10, 4, 8, 9.
I'm expecting the user to enter the base number. The user will enter the output base (the base to be converted to). The user will enter the number he wants to convert.
Pre thoughts: I will save the input base and the output base in variables. Then I'll save the number he enters in a string (because he could enter any kind of number (hex, binary, base-5..).
I'm just trying to figure out how to convert that string to a number so i can convert it to the output base.
Any ideas?