16 lines
267 B
C++
16 lines
267 B
C++
#include<iostream>
|
|
#include<algorithm>
|
|
#include<math.h>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
double a,b,c,p,Area;
|
|
cout<<"请输入三角形的三个边长:"<<endl;
|
|
cin>>a>>b>>c;
|
|
p=(a+b+c)/2;
|
|
Area=sqrt(p*(p-a)*(p-b)*(p-c));
|
|
cout<<Area<<endl;
|
|
return 0;
|
|
|
|
}
|