Question
(50 pts) Write a program that asks user an arithmetic operator('+','','' or '/') and two operands and perform the corresponding calculation on the operands. Specific
(50 pts) Write a program that asks user an arithmetic operator('+','','' or '/') and two operands and perform the corresponding calculation on the operands. Specific requirements: (1) Your main function accepts inputs and display calculation result.
(2) Write four functions to perform the four calculations. Call these functions in your main function.
(3) Repeatedly asks for inputs, calculate and display result until user input nonnumeric value for operands.
Hint: you can put getchar() right after scanf() to get rid of the newline character that comes though input to scanf(), so it wont affect the following single character input either by scanf() or getchar().
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