Untitled
unknown
plain_text
3 years ago
317 B
4
Indexable
#include <iostream>
#include <cmath>
using namespace std;
int main() {
float a, b, c, d;
cin >> a >> b >> c;
d = b * b - 4 * a * c;
if (d == 0) cout << (-b) / (2 * a);
else if (d > 0) {
cout << ((b-2*b) + sqrt(d)) / (2 * a) << ' ';
cout << ((b-2*b) - sqrt(d)) / (2 * a);
}
else cout << "NO";
}Editor is loading...