Question: For this assignment, we're creating a program that converts any binary, decimal, or hexadecimal number into binary, decimal, or hexadecimal form. The user should be

For this assignment, we're creating a program that converts any binary, decimal, or hexadecimal number into binary, decimal, or hexadecimal form.
The user should be able to enter any binary, decimal, or hexadecimal number. The program should auto-detect the base of the number.
The program should then prompt the user to convert to either binary, decimal, or hexadecimal.
The program should then do the conversion and display the result.
For example, if the user enters 101 and opts to convert it to decimal, the program should detect the number as binary (base 2) and it should convert it to 5(base 10). The output would look like this: 101->5.
## Grading Criteria
- The program includes a function that checks if a string of characters represents a binary number (1 point)
- The program includes a function that checks if a string of characters is a decimal number (1 point)
- The program includes a function that checks if a string of characters is a hexadecimal number (1 point)
- The program includes a function that determines the base of a string of characters (i.e. a binary number returns 2, a decimal number returns 10, a hexadecimal number returns 16)(1 point)
- The program includes a function that converts a string of characters to either binary, decimal, or hexadecimal depending on the parameters sent to it (1 point)
- The program correctly converts binary to decimal (1 point)
- The program correctly converts binary to hexadecimal (1 point)
- The program correctly converts decimal to binary (1 point)
- The program correctly converts decimal to hexadecimal (1 point)
- The program correctly converts hexadecimal to binary (1 point)
- The program correctly converts hexadecimal to decimal (1 point)
- The user is allowed to enter a number in binary, decimal, or hexadecimal format, otherwise the user is prompted to try again (1 point)
- The user is allowed to choose what to convert to (binary, decimal, or hexadecimal), otherwise the user is prompted to try again (1 point)
- The program shows the converted value correctly (i.e.101->5 if decimal was chosen)(1 point)
- The program continues allowing the user to convert different numbers until the user decides to exit (1 point)
- The program pauses at the end until the user presses enter to exit
- The author name, date, and program title are in the first three lines of the program
- The program runs without any errors

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 Programming Questions!