Question: Write a C++ program that calculates the quadratic formula It will take in three inputs: a, b, and c. It will return the roots of
Write a C++ program that calculates the quadratic formula

It will take in three inputs: a, b, and c. It will return the roots of the calculation. It will also have a function, haveImaginaryRoots, that will take in the inputs a, b, and c and return bool, using the formula: b2 4ac. If the result is library for pow and sqrt
Here's a sample run:
Enter a: 1 Enter b: -3 Enter c: 2 The roots are 1 and 2. Do you want to continue (Y/N)? Y Enter a: 1 Enter b: 0 Enter c: 9 The roots are 3i and -3i. Do you want to continue (Y/N)? N
Transcribed image text
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
