#include<#include
#include
int main ()
{
float a,b,c,disc,p,q;
printf("please enter the coefficients a,b,c");
scanf_s("%f,%f,%f",&a,&b,&c);
disc=b*b-4*a*c;
p= -b/(2*a);
q=sqrt(disc)/(2*a);
if(disc>=0)
{printf("x1=%7.4f,x2=%7.4f\n",p+q,p-q);
}
else
{printf("no answer");}
return 0;
}
/*哪边错了?我输1,1,1明显disc小于零,输出的却不是no answer.即使输入的正确比如1,2,1答案也不对*/