C program to Find all Roots of a Quadratic equation
1 min readApr 25, 2017
The term b2-4ac
is known as the determinant of a quadratic equation. The determinant tells the nature of the roots.
- If determinant is greater than 0, the roots are real and different.
- If determinant is equal to 0, the roots are real and equal.
- If determinant is less than 0, the roots are complex and different.
Output
Enter coefficients a, b and c: 2.3
4
5.6
Roots are: -0.87+1.30i and -0.87-1.30i
Source: https://www.programiz.com/c-programming/examples/quadratic-roots