0
#include <iostream> #include <cmath> using namespace std; int main() { float a, b, c, x1, x2, x; cout << "Enter coefficients a, b and c: "<<endl; cin >> a >> b >> c; x = b*b - (4*a*c); if (x>0){ x1 = (-b + sqrt(x)) / (2*a); x2 = (-b - sqrt(x)) /(2*a); cout << "x1 = " << x1 << endl; cout << "x2 = " << x2 << endl; }else { cout << "you should check back"; } return 0; } //can you help me complete it please
15th Apr 2018, 6:56 AM
Joseph Ojo
Joseph Ojo - avatar