Answered step by step
Verified Expert Solution
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=
- 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:
- A!=0. If this is violated, display Ax2 + Bx + C = 0, is not quadratic
- 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started