Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions