Question: 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
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 of the form ax2 + bx + c = 0. The formula for solving a quadratic equation is

Here are some example equations and their roots:
x2 − 7x + 12 : x = 4, x = 3
x − 3x + 2 : x = −2, x = −1
Your method should accept the coefficients a, b, and c as parameters and should print the roots of the equation. You may assume that the equation has two real roots, though mathematically this is not always the case.
6V - 4ac 2a ||
Step by Step Solution
3.33 Rating (186 Votes )
There are 3 Steps involved in it
public static void quadratic int a int b int c d... View full answer
Get step-by-step solutions from verified subject matter experts
