标题:帮忙看一下哪里出错了,大神们,高三应届毕业钻研中,感谢各位为大神指导
取消只看楼主
秋天凉
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2017-6-9
结帖率:0
已结贴  问题点数:20 回复次数:0 
帮忙看一下哪里出错了,大神们,高三应届毕业钻研中,感谢各位为大神指导
#include<stdio.h>
#include<math.h>
#include<Windows.h>
#include<cstdio>
using namespace std;
int main()
{
 float a, b, c, dell;
 printf("依次输入二元一次方程的三个系数,以空格隔开\n");
 scanf("%f%f%f", &a, &b, &c);
 dell = b*b - 4 * a*c;
 if (dell >=0)
{
 float x_1, x_2;
 float e = sqrt(dell);
 x_1 = (-b + e) / (2*a);
 x_2 = (-b - e) / (2*a);
 printf("方程的解为:X1=  %f \nX2=  %f\n", &x_1, &x_2);
}
else
printf("方程无解\n");
system("pause");
}
搜索更多相关主题的帖子: include system dell 
2017-06-09 22:20



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-477786-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.690410 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved