1 条题解

  • 0
    @ 2025-12-5 12:25:25

    C++ :

    #include<iostream>
    #include<math.h>
    #include<stdio.h>
    using namespace std;
      
    int main(){
        double a,b,c,p,s;
        cin>>a>>b>>c;
        if(a*a+b*b==c*c||a*a+c*c==b*b||c*c+b*b==a*a)
      {
        p=(a+b+c)/2;
        s=sqrt(p*(p-a)*(p-b)*(p-c));
        cout<<"s=";printf("%.2f\n",s);
      }
        else cout<<"No!";
        return 0;
    }
    
    • 1

    信息

    ID
    28
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者