Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Name Due Date Assignment Solutions to the quadratic equation Ax +Bx + C = 0 may be calculated using the quadratic formulas: x =

Name Due Date Solutions to the quadratic equation Ax +Bx + C =0 may be calculated using the quadraticPage 2 Your output, for running the program several times, may appear something like this. John Smith - This

Name Due Date Assignment Solutions to the quadratic equation Ax +Bx + C = 0 may be calculated using the quadratic formulas: x = -B+B2-4AC 2A -B-B-4AC 2A These formulas may be used, of course, only if the leading coefficient, A, is not zero. The number and type of solutions is determined by the value of the expression under the radical sign, B2-4AC, known as the discriminant: value of discriminant number of solutions kind of solutions positive 2 real zero 1 negative 2 real imaginary Your job is to write a program which will read the coefficients of a quadratic equation and, if the leading coefficient is non-zero, calculate and report the solutions. Since programming languages does not provide the imaginary type, you'll have to take appropriate steps to give imaginary results in the form shown. Just remember that every imaginary number is really determined by a pair of real numbers. Several sample runs appear on the next page; user input appears in bold type. The "*I" which appears in the output is simply written where necessary; the actual calculations involve only real results. You are not required to duplicate this output, but you should provide all information shown. Page 2 Your output, for running the program several times, may appear something like this. John Smith This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 2 -5 -3 The two real solutions are and x = 3.0000E+00 x = -5.0000E-01 Press ENTER to terminate. John Smith This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 2 -5 4 The two imaginary solutions are x = and x = 1.2500E+00 1.2500E+00 Press ENTER to terminate +(6.6144E-01) *I (6:6144E-01) *I John Smith - This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 1 -8 16 The one real solution is Press ENTER to terminate John Smith x = 4.0000E+00 This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 038 No solutions will be calculated for a leading coefficient of 0! Press ENTER to terminate.

Step by Step Solution

3.51 Rating (154 Votes )

There are 3 Steps involved in it

Step: 1

Sure I can help you with that Heres a Python program that reads the coefficients of a quadratic equa... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

What are the essential differences between victim and annex caches?

Answered: 1 week ago

Question

Describe the process of replacing bad habits with good ones.

Answered: 1 week ago