#include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c, delta, x1, x2;
cin >> a >> b >> c;
delta = b * b - 4 * a * c;
if (delta < 0) {
cout << "No solution";
return 0;
}
if (delta = 0) {
cout << "x1=x2=" << -b / (2 * a);
return 0;
}
x1 = (sqrt(delta) - b) / (2 * a);
x2 = (-sqrt(delta) - b) / (2 * a);
cout << "x1=" << fixed << setprecision(2) << x1 << endl;
cout << "x2=" << fixed << setprecision(2) << x2;
return 0;
}
不知道哪里错了,结果总是不对,求助