Question: Write a script that asks the user for the values of a , b and c , the coefficients of a quadratic equation: 2 +

Write a script that asks the user for the values of a, b and c, the coefficients of a
quadratic equation:
2++=0
The program first calculates the discriminant: =24 and
If D>0 the program displays the message: the equation has two roots, it
calculates the roots and displays them in next line
If D=0, the program displays message: the equation has one root, calculates
that root and shows it in next line
If D<0, the program displays a message: the equations has no real roots
Use the script to solve the following three equations: (loops are used to prompt the
user for the coefficients three times)
A.32+6+3=0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!