Question: Write a program that displays a menu on the screen. The menu will give the user four options - enter two integers, enter two decimal
Write a program that displays a menu on the screen. The menu will give the user four options - enter two integers, enter two decimal numbers (#.#), enter one integer and one decimal number, or quit. The inputs should be labelled a, b, c, or d, and you should enter in the letter to choose the appropriate option. Once the user selects the option, two numbers will be read in from the user. The numbers will be added together and then the result will be displayed on the screen. In the case of adding two decimal numbers, make sure that the output shows only two digits after the decimal. For the case of adding an int and a float, give two results - the result where you treat the int as a float, and the result where you cast the float to an int.
write in C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
