subject

The two roots of a quadratic equation, for example 2 + + = 0, can be obtained using the following formula: Two Roots: 1 = − + √ 2−4 2 and 2 = − − √ 2−4 2 2 − 4 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. One Root: 1 = − 2 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. Here are some sample runs:
Enter a, b, c: 1.0, 3, 1
The roots are -0.381966 and -2.61803
Enter a, b, c: 1, 2.0, 1
The root is -1.0
Enter a, b, c: 1, 2, 3
The equation has no real roots

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:00
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 20:00
Write c++programs for the following problem: let the user enter two numbers and display which is greater. !
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
What are the 4 basic items that are traded throughout the world?
Answers: 1
You know the right answer?
The two roots of a quadratic equation, for example 2 + + = 0, can be obtained using the following fo...
Questions
Questions on the website: 13722359