Question: help me please. Write a program to convert numbers in one base to numbers in a second base. There are 62 different digits: 10-9,A-Z,a- z

help me please.

help me please. Write a program to convert numbers in one base

Write a program to convert numbers in one base to numbers in a second base. There are 62 different digits: 10-9,A-Z,a- z } but to make easy we are going to restrict our case to 0-9 only HINT: If you make a sequence of base conversions using the output of one conversion as the input to the next, when you get back to the original base, you should get the original number Input The first line of input contains a single positive integer. This is the number of lines that follow. Each of the following lines will have a (decimal) input base followed by a (decimal) output base followed by a number expressed in the input base Both the input base and the output base will be in the range from 2 to 10 Output The output of the program should consist of two lines of output for each base conversion performed. The first line should be the input base in decimal followed by a space then the input number (as given expressed in the input base). The second output line should be the output base followed by a space then the input number (as expressed in the output base). The third output line is blank. Example Input 5 10 1044 5 2 1044 10 2 149 4 2 2111 Output 1044 149 1044 10010101 149 10010101 2111 10010101 10 10 4 Write a program to convert numbers in one base to numbers in a second base. There are 62 different digits: 10-9,A-Z,a- z } but to make easy we are going to restrict our case to 0-9 only HINT: If you make a sequence of base conversions using the output of one conversion as the input to the next, when you get back to the original base, you should get the original number Input The first line of input contains a single positive integer. This is the number of lines that follow. Each of the following lines will have a (decimal) input base followed by a (decimal) output base followed by a number expressed in the input base Both the input base and the output base will be in the range from 2 to 10 Output The output of the program should consist of two lines of output for each base conversion performed. The first line should be the input base in decimal followed by a space then the input number (as given expressed in the input base). The second output line should be the output base followed by a space then the input number (as expressed in the output base). The third output line is blank. Example Input 5 10 1044 5 2 1044 10 2 149 4 2 2111 Output 1044 149 1044 10010101 149 10010101 2111 10010101 10 10 4

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!