Quadratic Equation Program
Problem Statement
Write a program that solves quadratic equations, which are equations of the form ax2 + bx + c = 0. When given values for coefficients a, b, and c, there will be zero, one, or two values of x — called roots — that make the left side of the equation zero.
For example, the equation x2 + x − 2 = 0 with coefficients a = 1, b = 1, and c = -2 has the roots x = 1 and x = -2.
The equation x2 + 1.2x − 16.45 = 0 with coefficients a = 1, b = 1.2, and c = -16.45 has the roots x = 3.5 and x = -4.7.
Make use of the Quadratic Formula in your solution. You may ignore coefficients that cause the equation to have zero (or so-called “imaginary”) roots, and do not need to take steps to avoid the unusual results you'll see displayed on the screen.