idk

PHOTO EMBED

Tue Sep 20 2022 11:11:24 GMT+0000 (Coordinated Universal Time)

Saved by @Kyle #c++

#include <iostream>
#include <cmath>
using namespace std;

int main() {
    double a, b, c, ex, bac, sum1, sr, sum2, prod, quo;
    
    cout.setf(ios::fixed);
    cout.setf(ios::showpoint);
    cout.precision(1);
    
    cout << "Using the Quadratic Formula.\n"
    << "Please enter the value of a: ";
    cin >> a;
    cout << "Please enter the value of b: ";
    cin >> b;
    cout << "Please enter the value of c: ";
    cin >> c;
    
    ex = pow(b,2);
    bac = -4 * a * c;
    sum1 = ex + bac;
    sr = sqrt(sum1);
   
    if (sr > 0) { 
        sum2 = -b + sr;
        prod = 2 * a;
        quo = sum2 / prod;
        cout << "x = " << quo << endl;
    }
    
    else {
    cout << " - Undefined -" << endl 
        << "The square root of a negative number does not exist" << endl 
        << "in the set of real numbers." << endl;
    }
    
    return 0;
}
content_copyCOPY