NatsuDDW
NatsuDDW
11.10.2020 • 
Mathematics

Write a program that will solve a quadratic equation: ax2 + bx + c = 0. The program must ask the user to enter the values for a, b and c. It should then determine the discriminant of the parabola and based on the discriminant it should display the real roots: Discriminant = b2 - 4ac > 0 means there will be two distinct real roots. Discriminant = b2 - 4ac = 0 means there will be only one real root. Discriminant = b2 - 4ac < 0 means there will be no real roots. Use the if - then else structure in your program to decide the outcome of the program. User must then use the quadratic equation to solve for x: = − ± √ −

Solved
Show answers

Ask an AI advisor a question