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 13:40
/is used for a fraction 1) if x = 2/3 and y = 3/4, what is the value of (x + y) (x/y) expressed as a common fraction? 2) what is the least positive integer greater than 1 that leaves a remainder of 1 when divided by each of 2, 3, 4, 5, 6, 7, 8, and 9? 3) the ponde family's powerjet pumps 420 gallons of water per hour. at this rate, how many gallons of water will it pump in 45 minutes? 4) kim's insurance company pays 80% of the cost of all prescription medication she purchases in a year beyond the first $250 worth of prescriptions. her prescriptions for this year cost a total of $570. how many dollars of this amounts will kim's insurance company pay?
Answers: 1
question
Mathematics, 21.06.2019 18:00
Look at arnold's attempt to solve the equation for b: 3b = 12 b = 3 · 12 b = 36 describe the mistake that arnold made.
Answers: 2
question
Mathematics, 21.06.2019 20:00
Given ab and cb are tangents of p, and m =10°. what is the measure of abp?
Answers: 3
question
Mathematics, 21.06.2019 20:10
In the diagram, points d and e are marked by drawing arcs of equal size centered at b such that the arcs intersect ba and bc. then, intersecting arcs of equal size are drawn centered at points d and e. point p is located at the intersection of these arcs. based on this construction, m , and m
Answers: 1
You know the right answer?
Write a function for computing the roots using the following function header: int compute_roots(dou...
Questions
question
Mathematics, 02.12.2020 06:00
question
Mathematics, 02.12.2020 06:00
question
Mathematics, 02.12.2020 06:00
question
Mathematics, 02.12.2020 06:00
question
Mathematics, 02.12.2020 06:00
Questions on the website: 13722363