Question: Computer science homework, please help with C++ code You MUST use switch statement to complete the following exercise to receive points Write a program to
Computer science homework, please help with C++ code
You MUST use switch statement to complete the following exercise to receive points Write a program to achieve a four-function calculator. The program will first take two real (non-zero) numbers as input from the user. You can safely assume the user will always input two numbers. The program then outputs the following message to prompt another user inpu Please select: +: add two numbers. -: subtract two numbers. *: multiple two numbers. 1: divide two numbers. The user then enters one of the above characters for the program to perform the corresponding calculation on the previously two numbers. If the user enters other character than the above, program will print out Unknown calculation and exits. Ex: if the user enters: 2.5 4 * the program will output: 2.5 * 4 = 10.00 Note that the output of the calculation result is in decimal with two digit precision. Any attempt to hard code answers will result in a 0 for the exercise. 298500.1524762x3zqy7 LAB ACTIVITY 34.2.1: Unit 1 - Exercise 3B (3/13) 0/50 main.cpp ALIENWARE F4 FS F6 F7 MUTE F8 F9 Fio F F12 HOME END T-PAD ALIEN FX DELETE INSERT PRT SCRN PAUSE # $ % 1 & BACKSPACE 3 5 6 3 9 o R T 0 L { [ LL G J K L 11 HENTER V B N M ASHIFT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
