当前位置: > 框图"里的内容,我不太懂这个,想问你们下,根号b^2-1/4ac写成程序语句表达式是?...
题目
框图"里的内容,我不太懂这个,想问你们下,根号b^2-1/4ac写成程序语句表达式是?

提问时间:2020-07-24

答案
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的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.