Write a method called quadratic that solves quadratic equations and prints their roots. Recall that a quadratic
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 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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted: