Question: Write a quadratic calculator in C++ for the expression: a x + bx+c=0 1. Declare variables a, b, c. Choose arbitrary values for these

Write a quadratic calculator in C++ for the expression: a x +

 

Write a quadratic calculator in C++ for the expression: a x + bx+c=0 1. Declare variables a, b, c. Choose arbitrary values for these variable. Make sure that a is not zero and that the expresion inside the root is positive or zero to avoid working with imaginary numbers. 2. Find the two roots: x1 and x2 using the usual quadratic formula: -b62-4ac x = 29 3. As an example, if a=1, b=2, and c=1, you must display the result using the following form with each number showing 2 fractional digits: 1 x2.00 +2.00 x + 1.00 (x -1.00) (x -1.00) Note that because the roots in this example are negative (-1 and -1), the resulting factorization shows double negative signs. This is fine for the purposes of this assignment. 5. Find the maximum/minimum point using the formula: b 62 2a 4a display the result using that format (with parenthesis as shown above) and also with each number showing 2 fractional digits. 6. You must add comments to the code. The evaluation rubric includes: logic and code correctness, formatting (proper use of vertical alignment of C++ code), and explanation of steps (comments).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Code include using namespace std void printrootsin... View full answer

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!