Question: Write a Scheme function that computes the roots of a given quadratic equation. If the roots are real or complex, the function must display a

Write a Scheme function that computes the roots of a given quadratic
equation. If the roots are real or complex, the function must display a
1
message indicating that. This function must use an if function. The 3
parameters to the function are the 3 coefficients of the quadratic equation.
(quadratic_roots 10-1)
(newline)
(quadratic_roots 1-21)
(newline)
(quadratic_roots 123)
(newline)
The real roots are: (1-1)
The real roots are: (11)
The imaginary roots are: (-1.0+1.4142135623730951i
-1.0-1.4142135623730951i)

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!