Question: Problem 1 Write an user defined function that determines the real roots of a quadratic equation . Use the following structure for your function: [

Problem 1
Write an user defined function that determines the real roots of a quadratic equation . Use the following structure for your function:[]= quadraroots(a,b,c).
To calculate the roots of the equation, the program calculates the discriminant D, given by:
If D >0 the program displays The equation has two roots _____ and _____ and calculates them using
If D =0, the program displays The equation has one root _____., and calculate it using
If D <0 the program displays The equation has not real roots
Call the program from the main file and obtain the results using the following equations:
a.
b.
c.

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!