Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started