Question: Write a C program that asks the user which mathematical operation they would like to perform (add, subtract, multiply, or divide) then ask them for

 Write a C program that asks the user which mathematical operation

Write a C program that asks the user which mathematical operation they would like to perform (add, subtract, multiply, or divide) then ask them for two float numbers. Your program must use a switch statement and contain separate functions to perform the following mathematical calculations: addition, subtraction, multiplication, and division. Each function must accept the two numbers as parameters, perform the appropriate calculation on the two numbers and return the result back to the main () function. The main () function will then display the answer. You must use all local variables. Global variables will not be accepted

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!