Quadratic solution

Write and test program that solves quadratic equations.A quadratic equation is an equation of the form ax² + bx + c where a,b and c are given coefficients and x is unknown.the coefficients are real number inputs,so they should be declare of type float or double.since quadratic equations typically have two solutions,use x1 and x2 for the solutions to be output.these be declared of type double to avoid inaccuracies from round of errors.use this formula to help you out.

x = -b ± √(b²-4ac)
--------------
2a
This really isn't hard to create. Try it yourself. If you don't succeed, post your code and we will point you in the right way.
Topic archived. No new replies allowed.