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 : Roots of a Quadratic Equation A quadratic equation is any equation of the form where and are the coefficients of The roots of a quadratic equation can be calculated by the formula
The expression, 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 if it has real roots and 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
