框图"里的内容,我不太懂这个,想问你们下,根号b^2-1/4ac写成程序语句表达式是?
题目
框图"里的内容,我不太懂这个,想问你们下,根号b^2-1/4ac写成程序语句表达式是?
答案
sqrt(b*b - 1/(4*a*c))
------------------
or
void main(void)
{
float a,b,c;
float x,y,z;
float precision = 0.000001;
printf(c
Please input the the value of a.
");
scanf("%f",&a);
printf("
");
printf("
Please input the the value of b.
");
scanf("%f",&b);
printf("
");
printf("
Please input the the value of c.
");
scanf("%f",&c);
printf("
");
x = b*b;
y = 4*a*c;
if( (y < precision) && (y > -precision ) )
{
printf("
4ac is too closed to zero,can not get the result of b*b - 1/(4ac)
");
return;
}
z = x - 1/y;
if( z < precision )
{
printf("
b*b - 1/(4ac) is less than zero,can not get the result of b*b - 1/(4ac).
");
return;
}
printf("
b*b - 1/(4ac) =
%f
",sqrt(z) );
return;
}
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
- 《天净沙秋思》描绘了一幅绝妙的深秋晚景图,请任选其中一句话扩写成一段话
- (1)强酸制弱酸 (2)强酸制强酸 化学反应方程式
- 关于氨气的制取(在线等
- XYZ满足XY/X+Y=-2,YZ/Y+Z=3/4,ZX/Z+X=-4/3,求XYZ/XY+YZ+ZX的值
- 已知a+19=b+9=c+b,求代数式(b-a)的平方+(c-b)+(c-a)的平方的的值
- 说一说鱼类动物的生活及主要特征
- 甲仓库存梁数的五分之二,和乙仓库的存粮数三分之二相等,已知甲乙两仓共有200吨粮食,两仓各存粮多少吨?
- 新概念英语2能力训练与测试
- 如图所示,质量为3m的木块静止放置在光滑的水平面上.质量为m的子弹(可视为质 点)以
- 我们为中秋节制作了一些特殊的月饼,用英语怎么说
热门考点