框图"里的内容,我不太懂这个,想问你们下,根号b^2-1/4ac写成程序语句表达式是?
来源:学生作业帮 编辑:大师作文网作业帮 分类:数学作业 时间:2024/11/19 09:56:42
框图"里的内容,我不太懂这个,想问你们下,根号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\nPlease input the the value of a.\n");
scanf("%f",&a);
printf("\n");
printf("\nPlease input the the value of b.\n");
scanf("%f",&b);
printf("\n");
printf("\nPlease input the the value of c.\n");
scanf("%f",&c);
printf("\n");
x = b*b;
y = 4*a*c;
if( (y < precision) && (y > -precision ) )
{
printf("\n4ac is too closed to zero,can not get the result of b*b - 1/(4ac)\n");
return;
}
z = x - 1/y;
if( z < precision )
{
printf("\nb*b - 1/(4ac) is less than zero,can not get the result of b*b - 1/(4ac).\n");
return;
}
printf("\nb*b - 1/(4ac) = \n%f\n",sqrt(z) );
return;
}
------------------
or
void main(void)
{
float a,b,c;
float x,y,z;
float precision = 0.000001;
printf(c\nPlease input the the value of a.\n");
scanf("%f",&a);
printf("\n");
printf("\nPlease input the the value of b.\n");
scanf("%f",&b);
printf("\n");
printf("\nPlease input the the value of c.\n");
scanf("%f",&c);
printf("\n");
x = b*b;
y = 4*a*c;
if( (y < precision) && (y > -precision ) )
{
printf("\n4ac is too closed to zero,can not get the result of b*b - 1/(4ac)\n");
return;
}
z = x - 1/y;
if( z < precision )
{
printf("\nb*b - 1/(4ac) is less than zero,can not get the result of b*b - 1/(4ac).\n");
return;
}
printf("\nb*b - 1/(4ac) = \n%f\n",sqrt(z) );
return;
}
框图"里的内容,我不太懂这个,想问你们下,根号b^2-1/4ac写成程序语句表达式是?
+2!+...+100!的程序框图,并写出程序.高中课本内容解决下
在程序框图中,写1*2*3*4*5*6*…*n的程序框图中,能不能在运算框里直接计算n!,书上是这样写的(图1),想问能
设计算法求1/1*2+1/2*3+1/3*4+...+1/99+100的值,要求画出程序框图,写出基本语句编写的程序..
高一数学题写出1*2*3.*9*10的值的程序框图及程序语句
画出2*4*6*8.*100的程序框图当型和直到型并写出程序语句
-b土根号b2-4ac/2a写出数学表达式的VB表达式
画出计算1+2+3+4+5的程序框图
以下是计算1+2+3+4+…+100程序框图,请写出对应的程序.
1该程序的功能是求什么函数的函数值 2求程序框图
问一道关于程序框图的题
写出用循环语句描述求下面值的算法程序,并画出相应的程序框图