Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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! image text in transcribed
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

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

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

d. Who are important leaders and heroes of the group?

Answered: 1 week ago