能帮我看下这个到底哪里又问题啊 谢谢
#include<stdio.h>#include<math.h>
int main()
{
void d(double a1,double b1,double c1);
void d1(double a2,double b2,double c2);
void x(void);
int a,b,c,t;
printf("input:\n");
scanf("%d,%d,%d",&a,&b,&c);
t=b*b-4*a*c;
if(t>0)
d(a,b,c);
if(t=0)
d1(a,b,c);
if(t<0)
x();
printf("\n");
return 0;
}
void d(double a1,double b1,double c1)
{
double disc,x1,x2;
disc=b1*b1-4*a1*c1;
x1=(-b1+disc)/(2*a1);
x2=(-b1-disc)/(2*a1);
printf("two roots:x1=%f,x2=%f\n",x1,x2);
}
void d1(double a2,double b2,double c2)
{
double x1,x2;
x1=x2=(-b2)/(2*a2);
printf("x1=x2=%d\n",x1);
}
void x(void)
{
printf("no roots");
}