#include #include using namespace std; int main() { float a, b, c, d; float r1, r2; cout << "Enter a, b and c" << endl; cin >> a >> b >> c; d = (b * b) - (4 * a * c); if (d < 0) { cout << "No real roots" << endl; return (0); } r1 = (-b + sqrt(d)) / (2 * a); r2 = (-b - sqrt(d)) / (2 * a); cout << "First root: " << r1 << endl; cout << "Second root: " << r2 << endl; return (0); }