Write a main menu to have users to choose one of the following jobs
and implement each job in a function.

  1. Convert a binary number to a decimal number
  2. Convert a decimal number to a binary number
  3. Convert a hexadecimal number to a decimal number
  4. Convert a decimal number to a hexadecimal number.
  5. quit

You can test your program by the data from page 247.

You may set up the program to read data files and print the results.


There are some references:

  1. Convert Binary to Decimal
  2. Convert Decimal to Binary

Note: You can choose to do them by hands but need to show steps, not only answers.