Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ a. Write a program that receives an input from the user, their letter grade (A, B, C, D, F). The program should use switch
C++
a. Write a program that receives an input from the user, their letter grade (A, B, C, D, F). The program should use switch statement and displays a message that corresponds to the grade. Excellent! B Well done Well done D You passed Better try again IL 1 Sample output: Please enter your letter grade: D You passed Your grade is:D b. Write a basic calculator program that reads an equation via keyboard. The first value is an integer, followed by an operator (+,-",1,%) and another integer. Then use a switch to do the following operations. (Hint: pay attention when the denominator is equal to zero in division and modulus operations) . . . '+'for addition (num1 + num2) for subtraction (num1 - num2) *** for multiplication (num1 * num2) 'for division (num1 / num2) '%' for modulus (num1 % num2) A sample run of the program is (user input is indicated as bold): I Welcome to my Calculator Program Enter your calculation: 2 + 3 = 5 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started