Question: . . Write a well-documented C++ program that: prompts the user to enter from KBD two numbers of type integer num1 and num2. prompts the
. . Write a well-documented C++ program that: prompts the user to enter from KBD two numbers of type integer num1 and num2. prompts the user to enter from KBD one char op: +, - %,/. Entering other chars causes your program to display error message and quit. performs the operation indicated by the entered character op. prints the entered numbers, operator, and result at the beginning of a new line as shown below: num 1 op num2 = result Notes: 1) Use the names written in bold font in your program. 2) To improve the readability of your program, use good writing style elements such as comments, indentation 3) Verify the correctness of your program by running it with all operations and different numbers. 4) Solve the same problem using if statement and switch statement
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
