简单的c程序,求问怎么能让它在no answer时候只输出no answer
#include<stdio.h>#include<math.h>
int calculate(double a,double b,double c)
{
double z;
if((b*b-4*a*c)<0)
{
printf("no answer\n");
}
else z=b*b-(4*a*c);
return(z);
}
int main()
{
int calculatte(double a,double b,double c);
double d,e,f,j,o,p;
scanf("%lf,%lf,%lf",&d,&e,&f);
j=calculate(d,e,f);
j=sqrt(j);
o=(-e+j)/(2.0*d);
p=(-e-j)/(2.0*d);
printf("x1=%lf\nx2=%lf\n",o,p);
return 0;
}