/* Roots of ax^2 + bx + c = 0 */ #include #include #include using namespace std; int main(int argc, char *argv[]) { double a, b, c; double discriminant, root1_real, root2_real, root_double, root1_imag, root2_imag; cout<<"Input the coefficients a, b, c, of the quadratic equation: "; cin>> a >> b >> c; cout<< "Coefficients are "< 0 */ discriminant = pow(b,2) - 4 * a * c; if (discriminant > 0) // Two real roots { root1_real = (-b + sqrt(discriminant)) / (2 * a); root2_real = (-b - sqrt(discriminant)) / (2 * a); cout<<"root1 = "<