Quadratic equation code in c language

The values of x can be real or complex. The discriminant, , is used to determine the nature of the root(s). If the discriminant is negative, there will be no real roots. If the discriminant is 0, there will be one real root. In the third case, a positive discriminant will yield two real roots. (Real roots are of particular interest in solving physical world problems.)
Write a function that will determine the number of real roots for a quadratic equation as well as calculate any real roots. The function prototype should be:
Code Illustrationint calcQuadraticRoots(double a, double b, double c, double