精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • c語言程序設計題目:計算一元二次方程的根

    c語言程序設計題目:計算一元二次方程的根
    【程序填空】
    #include
    //
    else if(【?】)
    {x1=(-b+sqrt(disc))/(2*a);
    x2=(-b-sqrt(disc))/(2*a);
    printf("has distinct real roots:%8.4f and %.4f\n",x1,x2);
    }
    else
    {realpart=-b/(2*a);
    imagpart=sqrt(-disc)/(2*a);
    printf("has complex roots:\n");
    printf("%8.4f=%.4fi\n",realpart,imagpart);
    printf("%8.4f-%.4fi\n",realpart,imagpart);
    }
    }
    其他人氣:979 ℃時間:2020-04-03 11:59:48
    優(yōu)質(zhì)解答
    #include
    //
    else if(disc>0)
    {
    x1=(-b+sqrt(disc))/(2*a);
    x2=(-b-sqrt(disc))/(2*a);
    printf("has distinct real roots:%8.4f and %.4f\n",x1,x2);
    }
    else
    {
    realpart=-b/(2*a);
    imagpart=sqrt(-disc)/(2*a);
    printf("has complex roots:\n");
    printf("%8.4f+%.4fi\n",realpart,imagpart);
    printf("%8.4f-%.4fi\n",realpart,imagpart);
    }
    }
    }
    2 -3 -5
    the equationhas distinct real roots:2.5000 and -1.0000
    Press any key to continue
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機版