Question: Create a program that converts from one base (2-36) to another Asks the user for a number - your program should read this in as

Create a program that converts from one base (2-36) to another

Asks the user for a number - your program should read this in as a string/text...not as an integer (to account for alpha characters).

Ask for the initial number's base (doesn't matter how it is read in):

Ask for the target number's base (doesn't matter how it is read in):

The program should output the converted number.

Please write program in Java. (I am placing an arbitrary restriction on the symbols for digits 0-9A-Z...you could theoretically go even higher with your bases, but I haven't established which symbols to use.

Example Execution (Highlighting is showing the user input):

Enter a number: AZ 
Enter the number's base: 36 
Enter the target radix: 5 The number in base-5 is 3040 
 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!