Question: Write a function named QE with arguments aa, bb, cc that solves the quadratic equation ax^2 +bx+c=0 and returns the roots as a two-element vector
Write a function named QE with arguments aa, bb, cc that solves the quadratic equation ax^2 +bx+c=0 and returns the roots as a two-element vector of real or complex numbers. The arguments aa, bb, and cc are the coefficients of the quadratic equation. Tes you qe function with the R commands given below.
>qe(1,1,1)
>qe(1,2,1)
>qe(1,3,1)
Please write the answer as it would be inputted into R
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
