Question: Write in C ( simple coding ) Task 1 : ( Roots of a Quadratic Equation ) A quadratic equation is any equation of the

Write in C (simple coding)
Task 1: (Roots of a Quadratic Equation) A quadratic equation is any equation of the form ax2+bx+c=0 where a,b, and c are the coefficients of x. The roots of a quadratic equation can be calculated by the formula
x=-bb2-4ac22a
The expression, b2-4ac, which is called the discriminant. If it is positive then the equation has real roots. If the discriminant is negative, the equation has imaginary (or complex) roots. Write the following functions:
a. a function det that accepts the coefficients of an equation as parameters, and calculates the discriminant, it should print a statement that shows the equation from which type and return 1 if it has real roots and 0 if it has imaginary roots.
b. A function roots that calculates the roots of the equation in case the equation has real roots.
Write a program to test this function.
Write in C ( simple coding ) Task 1 : ( Roots of

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 Programming Questions!