Question: / * PROJECT 1 - Six - Function Calculator Below each comment you see, write code that satisfies its instructions. DO NOT CHANGE OR REMOVE

/*
PROJECT 1- Six-Function Calculator
Below each comment you see, write code that satisfies its instructions.
DO NOT CHANGE OR REMOVE ANYTHING IN THIS OR FUTURE PROJECTS! Comments are not only your instructions, but your rubric as well.
Your task is simply to add to it.
When finished, compress this project into a ZIP folder and submit it to Canvas.
*/
#include
//Add the cmath library to this project. (4)
using namespace std;
int main(){
//Create three integers called x, y, and operation.
//x and y represent the operands of the selected calculation.
//Prompt the user to enter whole number values for these variables.
//Your prompt should include two cout or printf calls to explain the required input
//and matching cin calls. (8)
cout<< "Available Operations:
\
1- Addition
\
2- Subtraction
\
3- Multiplication
\
4- Division (Quotient)
\
5- Division (Remainder)
\
6- Hypotenuse
\
Make a selection: ";
//operation represents the selected arithmetic function to perform.
//Create a cin call to take input for operation. (2)
//Create a switch statement to select and perform calculations based on input for operation.
//Cases 1,2, and 3 should perform their calculation with no error checking.
//Cases 4,5 should check if y is equal to zero.
//If it is, print an error and do not attempt to perform the operation.
//Case 6 should check if either x or y negative and, if so, make them positive.
//Include a default case that notifies the user of an invalid input.
//Each case is worth 8 points. The switch block itself is worth 10 points.
return 0;
}

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 Programming Questions!