#include<math.h>
int main()
{
float a,b,c,d;
double x1,x2;
printf("please input three numbers:");
scanf("%f%f%f",&a,&b,&c);
d =pow(b,2)-4*a*c;
printf("%f\n",d);
if(d<0)
{
printf("the input is wrong,please input again:");
}
else
{
x1=(-b+sqrt(d))/(2*a);
x2=(-b-sqrt(d))/(2*a);
printf("%lf\n%lf\n",x1,x2);
}
}
打扰一下,为什么我这个编译结果,三个都是零,求解