sqrt();
2024-02-09 15:52:57
发布于:河南
5阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
double triangle(double a, double b, double c){
double p = (a + b + c) / 2;
double s = sqrt(p * (p - a) * (p - b) * (p - c));
return s;
}
int main(){
double a, b, c;
cin >> a >> b >> c;
printf("%.2lf", triangle(a, b, c));
return 0;
}
这里空空如也
有帮助,赞一个