#include<stdio.h>
#include<math.h>
float a, b, c, x1, x2;
main() {
printf
("此程序为求解一元二次方程,请先将方程化为标准式,请输入abc的值:");
scanf("%d%d%d", &a, &b, &c);
if (b * b - 4 * a * c < 0) {
printf("此方程无实数解\n\n");
} else {
x1 == (-b + sqrt(b*b-4*a*c)) / (2 * a);
x2 == (-b - sqrt(b*b-4*a*c)) / (2 * a);
printf("x1=%f\nx2=%f\n\n", x1, x2);
}
return main();
}
哪里有问题吗?