请大侠看看我这程序错在哪里了....
# include <stdio.h># include <math.h>
int main(void)
{
int a,b,c;
printf("请输入a,b,c\n");
scanf("%d,%d,%d", &a,&b,&c);
double delta =b*b-4*a*c;
double x1,x2;
if (delta > 0)
{
x1 = (-b + sqrt(delta)) / (2 * a);
x2 = (-b - sqrt(delta)) / (2 * a);
printf("该一元二次方程有两个解, x1=(-%d + √(%d)) / (2 * a) = %f ; x2 = (-%d - √(%d) / (2 * a))");
}
if (delta = 0)
{
x1 = (-b) / (2 * a);
x2 = x1;
printf("该一元二次方程有一个唯一解, x1 = x2 = (-%d) / (2 * %d) = %f");
}
if (delta < 0)
{
printf("无解");
}
return 0;
}