C program to find Roots of Quadratic Equation

Find Roots of Quadratic Equation

Here, you will know about the roots of quadratic equation ,and get the example code of c program to find roots of quadratic equation using the bellow equations.

How to find Roots of Quadratic Equation

The roots of a quadratic equation are the values of x which make the equation equal to 0. A quadratic equation has two roots, which are found using the quadratic formula:

x = (-b ± √(b² – 4ac))/2a

where a, b, and c are the coefficients of the equation ax² + bx + c = 0.

 ax2+ bx +c = 0

C program to find Roots of Quadratic Equation

Input :

Enter Three Constants: 1 2 1

Output :

The Roots of equation are Real And Equal

The Roots are =Root1=Root2= -1.000000

Input :

Enter Three Constants: 2 3 4

Output :

The Roots of equation are Imaginary

 

 

Check out our other C programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top