Question: Question 1 1) [5 pts] Build a simple calculator using switch statements which can perform the four operations +,-, *, /. Write a program that
1) [5 pts] Build a simple calculator using switch statements which can perform the four operations +,-, *, /. Write a program that asks the user to enter two numbers/operands. Then prompt the user to enter the operator (+,-, *, /). Perform the corresponding operation and display the answer to user. The format of your output should exactly similar to the following. Show screenshots of all four operations and an invalid entry. Example of multiplication Microsoft Visual Studio Debug Console Enter an operator (+, *, /): * Enter two operands: 25.5 2.314 5 2.314 59.007 ) (5 pts) Create a program to prompt the user to enter the number of candy bars he or she would like to buy. The input will be a number. Use the switch/case structure to determine the bill, where l bar $o.75 2 bars $1.25 3 bars $1.65 more than 3 bars $1.65 $0.30 (number ordered 3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
