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

  • <center id="usuqs"></center>
  • 
    
  • c語言程序設(shè)計 輸入三角形的3條邊a,b,c,如果能構(gòu)成三角形,輸入面積crea和周長preimeter(保留兩位小數(shù))

    c語言程序設(shè)計 輸入三角形的3條邊a,b,c,如果能構(gòu)成三角形,輸入面積crea和周長preimeter(保留兩位小數(shù))
    其他人氣:387 ℃時間:2020-04-14 13:52:42
    優(yōu)質(zhì)解答
    #include
    #include
    void main(void)
    {
    double a, b, c, S, p;
    int TRUE = 0;
    printf("Enter three numbers for sides of a triangle: ");
    scanf("%lf %lf %lf", &a, &b, &c);
    if((a + b > c) && (b + c > a) && (c + a > b))
    {
    TRUE = 1;
    p = (a + b + c) / 2;
    S = sqrt(p * (p - a) * (p - b) * (p - c));
    }
    if(TRUE == 1)
    {
    printf("\nThese three sides can structure a triangle.\n");
    printf("The area of the triangle is %.2f.\n", S);
    printf("The perimeter of the triangle is %.2f.\n", 2 * p);
    }
    }
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機版