Please make sure the program is compilable and correct before you submit your an
ID: 3531932 • Letter: P
Question
Please make sure the program is compilable and correct before you submit your answer .....Thanks!!!!
Roots of a quadratic equation. Write a program that finds the roots of a quadratic equation using the quadratic formula. Begin by writing a main() function that carries out the following tasks:
a.) Call printf() to prompt the user for the coefficients a, b, and c.
b.) Call scanf() to read the coefficients.
c.) Call quadratic_formula() to compute the roots.
d.) Call printf() to print the results to the standard output, properly labeled.
Once main() is working, write quadratic_formula(). This function should return 0, 1, or 2, depending on whether there are no real roots (roots are imaginary), two equal real roots, or two distinct real roots. It should also compute any real roots and communicate them to main() using call by reference. The main() function should use the value returned by quadratic_formula() to determine how to label the output.