c语言 输出二次函数的根.帮我看看错在哪了,#include #include void main(){ double a,b,c,x1,x2,d,i,t;printf("请输入 a,b,c:\n"); scanf("%lf,%lf,%lf",&a,&b,&c);d=b*b-4*a*c;i=sqrt(-1);if(a==0)printf("不是二次函数\n");else if(d>0){x
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/25 09:38:11
![c语言 输出二次函数的根.帮我看看错在哪了,#include #include void main(){ double a,b,c,x1,x2,d,i,t;printf(](/uploads/image/z/2998696-40-6.jpg?t=c%E8%AF%AD%E8%A8%80+%E8%BE%93%E5%87%BA%E4%BA%8C%E6%AC%A1%E5%87%BD%E6%95%B0%E7%9A%84%E6%A0%B9.%E5%B8%AE%E6%88%91%E7%9C%8B%E7%9C%8B%E9%94%99%E5%9C%A8%E5%93%AA%E4%BA%86%2C%23include+%23include+void+main%28%29%7B+double+a%2Cb%2Cc%2Cx1%2Cx2%2Cd%2Ci%2Ct%3Bprintf%28%22%E8%AF%B7%E8%BE%93%E5%85%A5+a%2Cb%2Cc%3A%5Cn%22%29%3B+scanf%28%22%25lf%2C%25lf%2C%25lf%22%2C%26a%2C%26b%2C%26c%29%3Bd%3Db%2Ab-4%2Aa%2Ac%3Bi%3Dsqrt%28-1%29%3Bif%28a%3D%3D0%29printf%28%22%E4%B8%8D%E6%98%AF%E4%BA%8C%E6%AC%A1%E5%87%BD%E6%95%B0%5Cn%22%29%3Belse+if%28d%3E0%29%7Bx)
c语言 输出二次函数的根.帮我看看错在哪了,#include #include void main(){ double a,b,c,x1,x2,d,i,t;printf("请输入 a,b,c:\n"); scanf("%lf,%lf,%lf",&a,&b,&c);d=b*b-4*a*c;i=sqrt(-1);if(a==0)printf("不是二次函数\n");else if(d>0){x
c语言 输出二次函数的根.帮我看看错在哪了,
#include
#include
void main()
{ double a,b,c,x1,x2,d,i,t;
printf("请输入 a,b,c:\n");
scanf("%lf,%lf,%lf",&a,&b,&c);
d=b*b-4*a*c;
i=sqrt(-1);
if(a==0)
printf("不是二次函数\n");
else if(d>0)
{
x1=(-b+sqrt(d))/(2*a);
x2=(-b-sqrt(d))/(2*a);
printf("x1=%lf,x2=%lf\n",x1,x2);
}
else if(d
c语言 输出二次函数的根.帮我看看错在哪了,#include #include void main(){ double a,b,c,x1,x2,d,i,t;printf("请输入 a,b,c:\n"); scanf("%lf,%lf,%lf",&a,&b,&c);d=b*b-4*a*c;i=sqrt(-1);if(a==0)printf("不是二次函数\n");else if(d>0){x
#include
#include
void main()
{ double a,b,c,x1,x2,d,i,t;
printf("请输入 a,b,c:\n");
scanf("%lf,%lf,%lf",&a,&b,&c);
d=b*b-4*a*c;
i=sqrt(-1);
if(a==0)
printf("不是二次函数\n");
else if(d>0)
{
x1=(-b+sqrt(d))/(2*a);
x2=(-b-sqrt(d))/(2*a);
printf("x1=%lf,x2=%lf\n",x1,x2);
}
else if(d