subject
Mathematics, 01.10.2019 01:20 legendman27

Write a function for computing the roots using the following function header: int compute_roots(double a, double b, double c, double& x1, double& x2) the arguments a, b, c are the coefficients of the quadratic equation, and x1 and x2 are possible computed roots of the equation (depending on the return value). the return value of this function could be one of the numbers: 0 == no roots 1 == one root 2 == two real roots 3 == infinite number of roots 4 == no real roots you should save the return value in a variable, say, nroots and use it later in a switch statement switch(nroots). do not include any input or output statement inside all input/output statements should be in main() only. (b) test your function in main() for five different quadratic equations. use the included flow chart when writing the function.

ansver
Answers: 2

Another question on Mathematics

question
Mathematics, 21.06.2019 14:30
Which expression is equivalent to (3^2)^-2 a.-81 b.-12 c.1/81 d.1/12
Answers: 2
question
Mathematics, 21.06.2019 18:30
The border line of the linear inequality 4x + 7y < 5 is dotted true or false?
Answers: 2
question
Mathematics, 21.06.2019 19:00
Aprojectile is thrown upward so that its distance above the ground after t seconds is given by the function h(t) = -16t2 + 704t. after how many seconds does the projectile take to reach its maximum height?
Answers: 1
question
Mathematics, 21.06.2019 22:20
Atriangle has verticals at b(-3,0), c(2,-1), d(-1,2). which transformation would produce an image with verticals b”(-2,1), c”(3,2), d”(0,-1)?
Answers: 2
You know the right answer?
Write a function for computing the roots using the following function header: int compute_roots(dou...
Questions
question
Mathematics, 12.10.2020 17:01
question
Mathematics, 12.10.2020 17:01
question
Mathematics, 12.10.2020 17:01
question
Mathematics, 12.10.2020 17:01
Questions on the website: 13722367