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

USING C 8) Write a program that serves as a simple calculator.

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!