c语言:求二次函数ax^2+bx+c=0的根#includevoid main(){ float a,b,c,x1,x2,p,q,disc;\x05printf("input a,b,c\n");\x05scanf("a=%f,b=%f,c=%f",&a,&b,&c);\x05disc=b*b-4*a*c;\x05p=-b/(2*a);\x05q=sqrt(disc)/(2*a); x1=p+q;\x05x2=p-q;\x05printf("\nx1=%5
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/03 18:54:27
![c语言:求二次函数ax^2+bx+c=0的根#includevoid main(){ float a,b,c,x1,x2,p,q,disc;\x05printf(](/uploads/image/z/4325069-29-9.jpg?t=c%E8%AF%AD%E8%A8%80%EF%BC%9A%E6%B1%82%E4%BA%8C%E6%AC%A1%E5%87%BD%E6%95%B0ax%5E2%2Bbx%2Bc%3D0%E7%9A%84%E6%A0%B9%23includevoid+main%28%29%7B+float+a%2Cb%2Cc%2Cx1%2Cx2%2Cp%2Cq%2Cdisc%3B%5Cx05printf%28%22input+a%2Cb%2Cc%5Cn%22%29%3B%5Cx05scanf%28%22a%3D%25f%2Cb%3D%25f%2Cc%3D%25f%22%2C%26a%2C%26b%2C%26c%29%3B%5Cx05disc%3Db%2Ab-4%2Aa%2Ac%3B%5Cx05p%3D-b%2F%282%2Aa%29%3B%5Cx05q%3Dsqrt%28disc%29%2F%282%2Aa%29%3B+x1%3Dp%2Bq%3B%5Cx05x2%3Dp-q%3B%5Cx05printf%28%22%5Cnx1%3D%255)
xUNA~Mtmm/1.]mV "GE%A&m@C}=@K
Oцp{yj79}j߃Շ`UV'E(=-* 5"4|B,UF(Qq:[eZYQ
9WTѲ?`:*)d~* %ٚ4" t
D t%A/M{b_WEJɪ3L_AdV~pz}RQ[lOV}KGhН{Y1:sqgqyTy#RF0|(h.2lW:ctPǣ[=XWdUWSIWp2ӂ}3!w^[F&+;;a >0{/uR.Nr7,u|^F⪱KA^u߲ROܮKiѽ{5k(iӚ_onYKG$msoNµY?VLtڟ_j1"1g6&YkMXow̍sr