Question: USING C 8) Write a program that serves as a simple calculator. This program will read two integer numbers and an operator like+,-M% and then
USING C

8) Write a program that serves as a simple calculator. This program will read two integer numbers and an operator like+,-M% and then print the result according to given operator. Use a switch statement Sample output First run: Enter first number: 10 Enter second number: 20 Choose operation to perform (+,-,*J,%): + Result: 1020-30.000000 Second run Enter first number: 10 Enter second number: 3 Choose operation to perform (+,-,*J,%): / Result: 10/3-3.333333 Third run: Enter first number: 10 Enter second number: 3 Choose operation to perform (+,-,*J,%)> Invalid operation Result: 10 > 3 0.000000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
