为什么f3无法调用?求大虾指教。。
程序是求一元二次方程的根
#include"stdio.h"
#include"math.h"
void f1(double a,double b);
void f2(double det,double a,double b);
void f3(double det,double a,double b);
void main()
{
double a,b,c,d,det,a_2,real,imag,x1,x2;
printf("\nenter a,b,c:");
scanf("%lf%lf%lf",&a,&b,&c);
if(a==0&&b==0) printf("no root\n");
else if (a==0) printf("line equation root is %lf\n",-c/b);
else 
{d=b*b-4*a*c;
det=sqrt(fabs(d));
if(d<0) f1(a,b);
else if (d==0) f2(x1,x2,a_2);
else f3(real,imag);
}
}
void f1(double a,double b)
{printf("single real is %lf\n",-b/2*a);
}
void f2(double det,double a,double b)
{   double x1,x2,a_2;
a_2=2*a;
x1=-b/(a_2)+det/a_2;
x2=-b/(a_2)-det/a_2;
printf("the two real roots are %lf and %lf\n",x1,x2);
}
void f3(double det,double a,double b)
{   double real,imag;
real=-b/2*a;
imag=det/2*a;
printf("the two root are %lf+%lf i\nand              %lf-%lf i\n",real,imag,real,imag);
}