Question: Write a C program using the pow and sqrt functions to find the roots of a quadratic equation. The standard form of quadratic equation is:

 Write a C program using the pow and sqrt functions to

Write a C program using the pow and sqrt functions to find the roots of a quadratic equation. The standard form of quadratic equation is: ax2 + bx+c = 0 Your program should prompt the user to enter coefficients a, b, c. Calculate the discriminant of a quadratic equation b2 - 4ac. If the discriminant is greater than 0, program should calculate and display two roots: root1,2 = -btvb2-4ac 2a If the discriminant is equal to 0, program should calculate and display one root: - b root = 2a If the discriminant is less than 0, program should display the message "There are no real roots

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!