Write a program in a script file that determines the real roots of a quadraticequation

Chapter 6, Problem 12

(choose chapter or problem)

Write a program in a script file that determines the real roots of a quadraticequation ax2 + bx + c = 0 . Name the file quadroots. When the file runs, itasks the user to enter the values of the constants a, b, and c. To calculate theroots of the equation the program calculates the discriminant D, given by:D = b2-4acIf D > 0, the program displays message "The equation has two roots," and theroots are displayed in the next line.If D = 0, the program displays message "The equation has one root," and theroot is displayed in the next line.If D < 0, the program displays message "The equation has no real roots."Run the script file in the Command Window three times to obtain solutions tothe following three equations:(a) 3x2+6x+3 = 0 (b) -3x2+4x-6 = 0 (c) -3x2+7x+5 = 0

Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.

Becoming a subscriber
Or look for another answer

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back