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 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
question
Computers and Technology, 24.06.2019 16:30
What is the item which could be matched with a statement below? software installed on a computer that produces pop-up ads using your browser an example of social engineering malware loads itself before the os boot is complete type of spyware that tracks your keystrokes, including passwords windows key + l the practice of tricking people into giving out private information or allowing unsafe programs into the network or computer when someone who is unauthorized follows the employee through a secured entrance to a room or building a type of malware that tricks you into opening it by substituting itself for a legitimate program a computer that has been hacked, and the hacker is using the computer to run repetitive software in the background without the user's knowledge an infestation designed to copy itself repeatedly to memory, on drive space, or on a network
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Aobject is used for displaying the results of a question based on stored data. a. query b. report c. table d. form
Answers: 2
question
Computers and Technology, 25.06.2019 02:30
What group of plants produce fruit? question 2 options: gymnosperms nonvascular plants seedless vascular plants angiosperms
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
question
Mathematics, 10.01.2020 04:31
question
History, 10.01.2020 04:31
question
Mathematics, 10.01.2020 04:31
question
Mathematics, 10.01.2020 04:31
question
Mathematics, 10.01.2020 04:31
Questions on the website: 13722360