Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using c++ Your Assignment You must write a program that will implement several mathematical operations (we provide a list), ranging from simple mathematics to geometric

Using c++
image text in transcribed
Your Assignment You must write a program that will implement several mathematical operations (we provide a list), ranging from simple mathematics to geometric equations. To allow us to have a single program that may execute a different operation with each run, we utilize branching if-statements. We will also need to include the cmath library in the same area as our other library includes #include . We highly recommend you develop this program in steps, testing it and attempting to get useful feedback as you implement your solution. Acquiring Input The first thing the user will enter is the operation she wishes to perform: user entry will be the lowercase name from the list of operations. After you know the operation, you must acquire the numerical values for the computation. Since we are implementing several operations you will have to get between one and three numbers. All numerical inputs should be capable of storing floating point values Your program may have no more than 4 input statements (in other words, no more 1. 2. 3. than 4 cin statements), so plan and organize your code accordingly (ie. your input statements for all the operations have to be grouped together). IF YOU HAVE MORE THAN 4 CIN STATEMENTS YOU WILL RECEIVE A O ON THE ASSIGNMENT. Program Output The output will change based on the mathematical operation that is performed but it can be broken down into three categories: Equation, Result and Error. These categories should be the first thing output on the line, followed by the output for the operation. You will always output an Equation-we provide examples for the non-obvious operations. In your equation, your operands and operators should all have spaces around them. You will never output both a Result and an Error- it will always be one or the other We provide a list of errors, to be used as appropriate: . . . . o Use the exact text we give you. o You may utilize the same error in more than one operation. o An operation may have more than one error DO NOT copy and paste from Google Docs. Not all characters translate easily, such as apostrophes, and sometimes there are hidden characters. Mathematical Operations addition .fabs (floating point absolute value) . subtraction . division sqrt (square root) . quadratic (Quadratic Equation) Your Assignment You must write a program that will implement several mathematical operations (we provide a list), ranging from simple mathematics to geometric equations. To allow us to have a single program that may execute a different operation with each run, we utilize branching if-statements. We will also need to include the cmath library in the same area as our other library includes #include . We highly recommend you develop this program in steps, testing it and attempting to get useful feedback as you implement your solution. Acquiring Input The first thing the user will enter is the operation she wishes to perform: user entry will be the lowercase name from the list of operations. After you know the operation, you must acquire the numerical values for the computation. Since we are implementing several operations you will have to get between one and three numbers. All numerical inputs should be capable of storing floating point values Your program may have no more than 4 input statements (in other words, no more 1. 2. 3. than 4 cin statements), so plan and organize your code accordingly (ie. your input statements for all the operations have to be grouped together). IF YOU HAVE MORE THAN 4 CIN STATEMENTS YOU WILL RECEIVE A O ON THE ASSIGNMENT. Program Output The output will change based on the mathematical operation that is performed but it can be broken down into three categories: Equation, Result and Error. These categories should be the first thing output on the line, followed by the output for the operation. You will always output an Equation-we provide examples for the non-obvious operations. In your equation, your operands and operators should all have spaces around them. You will never output both a Result and an Error- it will always be one or the other We provide a list of errors, to be used as appropriate: . . . . o Use the exact text we give you. o You may utilize the same error in more than one operation. o An operation may have more than one error DO NOT copy and paste from Google Docs. Not all characters translate easily, such as apostrophes, and sometimes there are hidden characters. Mathematical Operations addition .fabs (floating point absolute value) . subtraction . division sqrt (square root) . quadratic (Quadratic Equation)

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

Recommended Textbook for

More Books

Students also viewed these Databases questions