1. write a C++ program to decide if the coefficients of a quadratic equation have real roots. The three choices will be to write the message “zero divide” when A is zero, write the message “no real roots” if the discriminant is negative and find the two roots when there is no error condition. DO NOT FIND THE ROOT IF THERE IS AN ERROR CONDITION.
2. use a NESTED DECISION to do the three parts of the algorithm above.
3. write a sentinel-controlled loop based on a character value to control the loop, q or Q will terminate the loop, any other value will continue processing. Read the value from the keyboard and write to the monitor. Use the inputs given below.
4. document the program properly, see page 3 of the syllabus for the correct style. Use format for both the roots. Be sure to set the iosflags, setprecision, and showpoint. Use a setprecision of 3. also use setw for each numeric output.
5. libraries needed: iostream, cmath, iomanip. Add the .h, math.h for other compilers.
Sample input:
For character variable, and A, B, and C, respectively.
T 2.0 -3.0 -7.0
T 0.0 5.5 1.3
K 3.0 -1.0 10.0
Q//the sentinel value
Sample output
The two roots are -1.266 and 2.766 (first input above)
Zero divide (second input above)
No real roots (third input value)
This is what have so far but i am very confused on what order to put it in
#include <iostream>
#include <math.h>
#include <iomanip>
int main (void)
{
float coefficients
float roots
cout<< "Enter three coefficients of a quadratic equation or Q to quit\n";
cin >> num 1, num 2, num 3