单项选择题

以下程序是求一元二次方程:根的程序:
#include #include #define ZERO 1E-6int main(){ double a,b,c,disc,x1,x2; double realpart,imagpart;   printf("please input a/b/c:");   scanf("%f%f%f",a,b,c);------------------------(1) if(fabs(a) <= 1E-6)----------------------------------(2)   printf("It is not a quadratic equation!"); else  {   disc = b * b - 4 * a * c;    if(fabs(disc)  ZERO) ------------------------(4)      {        x1 = (-b + sqrt(disc)) / (2 * a);        x2 = (-b - sqrt(disc)) / (2 * a);        printf("It has real roots:  x1=%8.4f\tx2=%8.4f",x1,x2);       }     else     {       realpart = -b / (2 * a);       imagpart = sqrt(-disc) / (2 * a);       printf("It has complex roots:");       printf(" x1=%8.4f+%8.4fi\t",realpart,imagpart);       printf(" x2=%8.4f-%8.4fi",realpart,imagpart);     }   } return 0;}
求程序中错误的地方是(   )。
A、(1)
B、(2)
C、(3)
D、(4)

微信扫码免费搜题