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

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!