# include & ltmath.h & gt
int main()
{
雙a,b,c,圓盤,p,q,x1,x2;
scanf("%lf%lf%lf ",& amp壹,& ampb & amp;c);
disc = b * b-4 * a * c;
如果(a!= 0)
{
if(disc & lt;0)
printf(" \ n ");
其他
{
p =-b/(2.0 * a);
q = sqrt(disc)/(2.0 * a);
x 1 = p+q;
x2 = p-q;
if(disc & gt;0)
printf("%f%f\n ",x1,x2);
else printf("%f\n ",x 1);
}
}
else if(b == 0)
{
如果(c == 0)
Printf("有無窮多個解\ n ");
其他
Printf("無解\ n ");
}
其他
{
x 1 =-c/b;
printf("x =%f\n ",x 1);
}
返回0;
}