程序设计用求根公式求一元二次方程x^2+3x+2=0的解.
<p>问题:程序设计用求根公式求一元二次方程x^2+3x+2=0的解.<p>答案:↓↓↓<p class="nav-title mt10" style="border-top:1px solid #ccc;padding-top: 10px;">樊炳辉的回答:<div class="content-b">网友采纳 python importmath a=1.0 b=3.0 c=2.0 x1=(-b+math.sqrt(b**2-4*a*c))/(2*a) x2=(-b-math.sqrt(b**2-4*a*c))/(2*a)
页:
[1]