Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions