+1(805) 568 7317

write a c program regarding the discriminant b 2 4ac of thequadratic formula the pro 4946990

Write a C++ program regarding the discriminant(b^2-4ac) of thequadratic formula. The program must be able to read in the value ofthe a,b, and c of the discriminant and perform the following: . 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. . If the discriminant is equal to 0, the roots are real andequal. if the value of the discriminant is negative, then the equationhas two complex roots. A sample program is below: 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:- Please write an explanatory comment on every line of code, thankyou in advance. . . .

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon

Order Now