#10 Java Program to Find Roots of Quadratic Equation | Quadratic Equations using if-else in Java

preview_player
Показать описание
Java Program to Find Roots of Quadratic Equation | Solve Quadratic Equations using if-else in Java

The standard form of a quadratic equation is:
ax2 + bx + c = 0, where
a, b and c are real numbers and
a ≠ 0

Roots of a quadratic equation are determined by the following formula:

To calculate the roots −
• Calculate the determinant value (b*b)-(4*a*c).
• If determinant is greater than 0 roots are real and unequal
[-b +squareroot(determinant)]/2*a and
[-b -squareroot(determinant)]/2*a.
• If determinant is equal to 0 root are real and equal is
-b/(2*a)
. If determinant is less than 0 roots are imaginary

Source Code:

Thanks for Watching and Please Do Subscribe My Channel
# RootsofQuadraticEquation #JavaQuadraticEquation
Рекомендации по теме