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:
The program first calculates the discriminant: and
If D the program displays the message: the equation has two roots, it
calculates the roots and displays them in next line
If D the program displays message: the equation has one root calculates
that root and shows it in next line
If D 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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
