Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.000000Step 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