Exercise 3.8 asked you to write a method called quadratic that solves quadratic equations and prints their roots. recall that a quadratic equation is a polynomial equation in terms of a variable x of the form a x2 + b x + c = 0. the formula for solving a quadratic equation is:

Respuesta :

Given a quadratic equation which is a polynomial equation in terms of a variable x of the form ax^2+bx+c=0. The quadratic formula for solving a quadratic equation is:

x=[-b+/-√(b²-4ac)]/2a

where a,b and c are the respective coefficients as indicated in the quadratic form.