Question: Write a full program as follows in C language using a menu, and scanf, and math.h: Display a menu with six options. 1- Convert from
Write a full program as follows in C language using a menu, and scanf, and math.h:
Display a menu with six options. 1- Convert from decimal to binary. 2- Convert from decimal to hexadecimal. 3- Convert from binary to decimal. 4- Convert from binary to hexadecimal. 5- Convert from hexadecimal to decimal. 6- Convert from hexadecimal to binary.
For decimal to binary, ask the user for a positive integer value between 0 and 255. Convert the value to binary and output as a binary number.
For decimal to hexadecimal, ask the user for a positive integer between 0 and 255. Convert the value to hexadecimal and output as a hexadecimal number.
For binary to decimal, ask the user for a binary number up to eight bits. Convert the value to decimal and output as a decimal number.
For binary to hexadecimal, ask the user for a binary number up to eight bits. Convert the value to decimal and output as a hexadecimal number.
For hexadecimal to decimal, ask the user for a two digit hexadecimal number. Convert the value to decimal and output as a decimal number.
For hexadecimal to binary, ask the user for a two digit hexadecimal number. Convert the value to binary and output as a binary number.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
