填空题
若运行以下程序时输入:6 3 1<回车>,则程序的运行结果是 。#include #include int main ( ){double a,b,c,disc,x1,x2,p,q;scanf("%lf%lf%lf",&a,&b,&c);disc=b*b-4*a*c;if (disc<0)printf("This equation hav't real roots\n");else{ p=-b/(2.0*a);q=sqrt(disc)/(2.0*a);x1=p+q;x2=p-q;printf("real roots:\nx1=%7.2f\nx2=%7.2f\n",x1,x2);}return 0;}
填空题
若运行以下程序时输入:2 4 1<回车>,则程序的运行结果是 。#include #include int main ( ){double a,b,c,disc,x1,x2,p,q;scanf("%lf%lf%lf",&a,&b,&c);disc=b*b-4*a*c;if (disc<0)printf("This equation hav't real roots\n");else{ p=-b/(2.0*a);q=sqrt(disc)/(2.0*a);x1=p+q;x2=p-q;printf("real roots:\nx1=%7.2f\nx2=%7.2f\n",x1,x2);}return 0;}
填空题
若运行以下程序时输入:3.6,-3.2<回车>,则程序的运行结果是 。#include int main(){float a,b,t;scanf("%f,%f",&a,&b);if(a>b){t=a;a=b;b=t;}printf("%5.2f,%5.2f\n",a,b);return 0;}
填空题
若运行以下程序时输入:3,7,1<回车>,则程序的运行结果是 。#include int main(){float a,b,c,t;scanf("%f,%f,%f",&a,&b,&c);if(a>b){t=a;a=b;b=t;}if(a>c){t=a;a=c;c=t;}if(b>c){t=b;b=c;c=t;}printf("%5.2f,%5.2f,%5.2f\n",a,b,c);return 0;}
套餐购买该问题答案仅对会员开放,欢迎开通会员 ¥ 19.9
0.64/天
1个月(不限次)
¥ 19.9
1000次
(不限时)
¥ 29.9
0.32/天
3个月(不限次)
¥ 59.9
0.16/天
1年(不限次)
立即支付