Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that will solve any quadratic function with real roots using the quadratic formula: Ax 2 + Bx + C = 0, root1=

  1. Write a program that will solve any quadratic function with real roots using the quadratic formula:

Ax2 + Bx + C = 0, root1= (-B-sqrt(B*B 4*A*C))/(2*A), root2 = (-B+sqrt(B*B 4*A*C))/(2*A)

The user will be allowed to solve as many quadratic equations as possible. Use a while loop menu; the user is prompted to enter A, B, C until the user is ready to quit. Note the following:

  1. A!=0. If this is violated, display Ax2 + Bx + C = 0, is not quadratic
  2. B*B-4*A*C>=0. If this is violated, display Ax2 + Bx + C = 0, does not have real roots

If the two conditions are satisfied, calculate and display the roots.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

2. Are my sources up to date?

Answered: 1 week ago