Quadratic equation is in the form = **ax ^{2} + bx + c**

Discriminant (**d**) = **b ^{2} – 4ac**

Then roots are calculates using the equations below

Root_1 = (-b + √d)/2a

Root_2 = (-b – √d)/2a

See the image below

**Java Code**:

**Output**:

Quadratic Equation: +3x^2 -5x -8 = 0, Roots are:(2.6666666666666665, -1.0