for a quadratic equation ax2 bx c 0 where a b and c arecoefficients it s roots is gi 4946695

For a quadratic equation ax2+bx+c = 0 (where a, b and c arecoefficients), it’s roots is given by the formula:- The value of the discriminant (b2-4ac) determines the nature ofroots. Write a C++ program that reads the values of a, b and c fromthe user and performs the following:- a. If the value of the discriminant is positive, program shouldprint out that the equation has two real roots and prints thevalues of the two roots. b. If the discriminant is equal to 0, the roots are real andequal. c. if the value of the discriminant is negative, then theequation has two complex roots. Sample Output Enter values for a, b and c:- 2 10 3

Discriminant = 76 Equation has two real roots

Roots are as follows:-

x1 = -0.320551

x1 = -0.320551 Any character to end:- . . .

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now