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

  • <center id="usuqs"></center>
  • 
    
  • 編寫程序,提示用戶輸入三角形的三條邊長,判斷該三角形是否為直角三角形,若是則輸出結(jié)果以及三角形面積.

    編寫程序,提示用戶輸入三角形的三條邊長,判斷該三角形是否為直角三角形,若是則輸出結(jié)果以及三角形面積.
    其他人氣:456 ℃時間:2020-04-19 18:34:10
    優(yōu)質(zhì)解答
    #include
    void main(void)
    {
    int a,b,c;
    double S;
    int TRUE = 0;
    printf("Enter three numbers for sides of a triangle:");
    scanf("%d %d %d",&a,&b,&c);
    if(a * a + b * b == c * c)
    {
    TRUE = 1;
    S = a * b / 2;
    }
    if(b * b + c * c == a * a)
    {
    TRUE = 1;
    S = b * c / 2;
    }
    if(c * c + a * a == b * b)
    {
    TRUE = 1;
    S = c * a / 2;
    }
    if(TRUE == 1)
    {
    printf("\nIt is a right angle triangle.\n");
    printf("And the area of the triangle is %lf.\n",S);
    }
    }
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機版