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
Write an user defined function that determines the real roots of a quadratic equation Use the following structure for your function: quadrarootsabc
To calculate the roots of the equation, the program calculates the discriminant D given by:
If D the program displays The equation has two roots and and calculates them using
If D the program displays The equation has one root and calculate it using
If D 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
