关于C语言解一元二次方程的问题为啥b,c的值都为0呢#include "stdio.h"#include "math.h"int main(){double a,b,c;double delta,x1,x2;printf("Please input 3 real numbers for a,b,c\n");scanf("%lf%lf%lf",&a,&b,&c);printf("a=%f b=%f c=%

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 12:49:59
关于C语言解一元二次方程的问题为啥b,c的值都为0呢#include
xRKP]\")mM47O̦\>I4M2IA(pF\8 7c7} oC2BB;=uuw1.>\Gٗwϗgߖo'OX G '}.ͨFz(!?+4H`RN!aJ'ָ{Ra{IRFI! JJP&->N"*ͻbH

关于C语言解一元二次方程的问题为啥b,c的值都为0呢#include "stdio.h"#include "math.h"int main(){double a,b,c;double delta,x1,x2;printf("Please input 3 real numbers for a,b,c\n");scanf("%lf%lf%lf",&a,&b,&c);printf("a=%f b=%f c=%
关于C语言解一元二次方程的问题
为啥b,c的值都为0呢
#include "stdio.h"
#include "math.h"
int main()
{
double a,b,c;
double delta,x1,x2;
printf("Please input 3 real numbers for a,b,c\n");
scanf("%lf%lf%lf",&a,&b,&c);
printf("a=%f b=%f c=%f\n",a,b,c);
delta=b*b-4*a*c;
x1=(-b-sqrt(delta))/(2*a);
x2=(-b+sqrt(delta))/(2*a);
printf("x1=%fx2=%f\n",x1,x2);
return 0;
}

关于C语言解一元二次方程的问题为啥b,c的值都为0呢#include "stdio.h"#include "math.h"int main(){double a,b,c;double delta,x1,x2;printf("Please input 3 real numbers for a,b,c\n");scanf("%lf%lf%lf",&a,&b,&c);printf("a=%f b=%f c=%

TDM-GCC 64位元编译无误.