You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#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;
|
|
|
|
}
|