Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program thatmimics a calculator. The program should take as input two in

ID: 3614873 • Letter: W

Question

Write a program thatmimics a calculator. The program should take as input two integersand the operator that the operation to be performed. It should thenoutput the numbers, the operators, and theresult.

(For division,if the denominator is zero, output an appropriatemessage)

Note: pleaseuse the switch syntax to solve this problem.

Some sampleoutputs follow:

3 + 4 =7

13 * 5 =65

Explanation / Answer

Code: #include int main(void) {         int a;         int b;         int result;         char op;         std::cout a;         std::cin >>op;         std::cin >> b;         switch (op)         {                case '+':                        result = a + b;                        break;                case '-':                        result = a - b;                        break;                case '*':                        result = a * b;                        break;                case '/':                        if (b == 0)                        {                                std::cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote