``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172`` `````` #include #include #include #include using namespace std; int main() { string Name; double a; double b; double c; double discriminant; double x1; double x2; cout << scientific; bool bFail; cout << "\t\t\t===============================\n"; cout << "\t\t\t\tQuadratic Equation\n"; cout << "\t\t\t===============================\n"; cout << "Full Name:"; getline(cin,Name); cout << "\n\n"; cout << setw(25) << Name << "\n"; cout << "This program will provide solutions for an equation of the form:\n"; cout << "\t\ta*x^2 + b*x + c = 0\n"; cout << "Where a,b, and c are integers and a is not equal to zero\n"; do{ cout << "Enter value of a:"; cin >> a; if (a == 0) {cout << "No solution!\n"; } else if (a != 0) { bFail = cin.fail(); cin.clear(); cin.ignore(numeric_limits::max(),'\n'); } }while(bFail == true); do{ cout << "Enter value of b:"; cin >> b; bFail = cin.fail(); cin.clear(); cin.ignore(numeric_limits::max(),'\n'); }while(bFail == true); do{ cout << "Enter value of c:"; cin >> c; bFail = cin.fail(); cin.clear(); cin.ignore(numeric_limits::max(),'\n'); }while(bFail == true); discriminant = pow(b,2) - 4 * a * c; return 0; }``````