(Algebra: solve quadratic equations) The two roots of a quadratic equation ax2 + bx + x = 0 can be obtained using the following formula:

Write a function with the following header
void solveQuadraticEquation( double a, double b, double c, double& discriminant, double & r1 ,double & r2)
b2 − 4ac is called the discriminant of the quadratic equation. If the discriminant is less than 0 , the equation has no roots. In this case, ignore the value in r1 and r2.
Write a test program that prompts the user to enter values for a , b , and c and dis;plays the result based on the discriminant. If the discriminant is greater than or equal to 0, display the two roots. If the discriminant is equal to 0 , display the one root. Otherwise, display "the equation has no roots". See Programming Exercise for sample runs.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.