Untitled
unknown
plain_text
2 years ago
379 B
3
Indexable
#include <iostream> #include <cmath> using namespace std; //(y-b)/k int main() { int a, b, c, d, x1, x2; cin >> a >> b >> c; d = (b * b) - (4 * a * c); if (d>0){ x1 = (-b + sqrt(d)) / (2 * a); x2 = (-b - sqrt(d)) / (2 * a); cout << x1 <<" " << x2; } if (d == 0) { cout << (-b) / (2 * a); } if (d < 0) { cout << "net korney"; } }
Editor is loading...