1. Engineering
  2. Computer Science
  3. 31 algebra solve quadratic equations the two roots of a...

Question: 31 algebra solve quadratic equations the two roots of a...

Question details

3.1 (Algebra: solve quadratic equations) The two roots of a quad *3.5 +br +-0 can be obtained using the following formula: 4ac and 2 2a 2a b - 4ac is called the discriminant of the quadratic equation. If it is positive, the equation has two real roots. If it is zero, the equation has one root. If it is negative, the equation has no real roots. Write a program that prompts the user to enter values for a, b, and c and displays the result based on the discriminant. If the discriminant is positive, display two roots. If the discriminant is 0, display one root. Otherwise, display The equation has no real roots. Note you can use Math. pow(x, runs: 0.5) to compute Vx. Here are some sample Enter a, b, c: 1,031 The equation has twq ront tr
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution