Write a program to calculate the roots of a quadratic equation. First, read three coefficients: a, b, and c. Then calculate the two roots of the equation ax2+bx+c=0.
Assume that b2−4ac>0, so there are two real roots.
The output should display the two roots, with the smaller one first and the larger one second.
The three coefficients of a quadratic equation (arranged in descending order)
Ex. -1.0
1.0
6.0
Roots of a quadratic equation (output smaller ones first, then larger ones)
Ex. -2.000000
3.000000