c语言写二元一次方程#include#include#includeint main(void){ double a,b,c,x1,x2; scanf("%lf%lf%lf",&a,&b,&c); x1=(-b+sqrt(b*b-4*a*c))/(2*a); x2=(-b-sqrt(b*b-4*a*c))/(2*a); if(b*b-4*a*c>=0) x1=x1; x2=x2;else x1=0;x2=0; printf("%lf%lf",

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/25 15:49:44
c语言写二元一次方程#include#include#includeintmain(void){doublea,b,c,x1,x2;scanf("%lf%lf%lf",&a,&b,&c);x1=(-b

c语言写二元一次方程#include#include#includeint main(void){ double a,b,c,x1,x2; scanf("%lf%lf%lf",&a,&b,&c); x1=(-b+sqrt(b*b-4*a*c))/(2*a); x2=(-b-sqrt(b*b-4*a*c))/(2*a); if(b*b-4*a*c>=0) x1=x1; x2=x2;else x1=0;x2=0; printf("%lf%lf",
c语言写二元一次方程
#include
#include
#include
int main(void)
{
double a,b,c,x1,x2;
scanf("%lf%lf%lf",&a,&b,&c);
x1=(-b+sqrt(b*b-4*a*c))/(2*a);
x2=(-b-sqrt(b*b-4*a*c))/(2*a);
if(b*b-4*a*c>=0) x1=x1; x2=x2;else x1=0;x2=0;
printf("%lf%lf",x1,x2);
system("pause");
return 0;
}
才学c求指导哪里错了

c语言写二元一次方程#include#include#includeint main(void){ double a,b,c,x1,x2; scanf("%lf%lf%lf",&a,&b,&c); x1=(-b+sqrt(b*b-4*a*c))/(2*a); x2=(-b-sqrt(b*b-4*a*c))/(2*a); if(b*b-4*a*c>=0) x1=x1; x2=x2;else x1=0;x2=0; printf("%lf%lf",
if(b*b-4*a*c>=0) x1=x1; x2=x2;else x1=0;x2=0;
是不是你这儿没有用大括号的原因?