Question: i am trying to complete this with C++. i am having trouble with using the quadratic formula in sections 4&5. any help is greatly appreciated!

i am trying to complete this with C++. i am having trouble with using the quadratic formula in sections 4&5. any help is greatly appreciated! i am trying to complete this with C++. i am having trouble

4. Now, find the two roots: x1 and x2 using the usual quadratic formula and the values entered for a, b, and c: b b2-4ac Za 5. Next display the quadratic expression and its roots as follows. For the values a=1, b=2, and c=1 in the example, the output must look like: 1.00 x2.00 +2.00 x + 1.00 = (x --1.00) (x - -1.00) "x2.00" here represents the square of x. The left-hand side is the quadratic expression with the values selected by the user. The right-hand side shows the roots. Make sure that all numbers are shown with exactly 2 decimals. See Section 8.2 "Output formatting" in the textbook for an example of how to achieve this effect using "cout" and the library "iomanip". Also note that the roots in this example are negative (-1 and -1), which is the reason why the factorization has double negative signs, so it shows"(x- followed by a negative number. Although not visually pleasant, this is fine for the purposes of this assignment

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!