#include <iostream>
#include <cmath>
using namespace std;
int main() {
double a, b, c, d, x1, x2, x3, realPart, imaginaryPart;
cout << "输入a、b、c、d的值: ";
cin >> a >> b >> c >> d;
double delta = b * b - 3 * a * c;
if (delta > 0) {
x1 = (-b + sqrt(delta)) / (3 * a);
x2 = (-b - sqrt(delta)) / (3 * a);
x3 = (-d / a) / (x1 * x2);
cout << "三个不同的实根:" << x1 << ", " << x2 << ", " << x3 << endl;
}
else if (delta == 0) {
x1 = -b / (3 * a);
x2 = -b / (3