欧阳宏泰 • 1天前
using namespace std;
int main() {
double x1,y1,x2,y2,x3,y3;
cin>>x1>>y1>>x2>>y2>>x3>>y3;
double a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
double b=sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
double c=sqrt((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3));
double p=(a+b+c)/2;
printf("%.2lf",sqrt(p*(p-a)*(p-b)*(p-c)));
return 0;
}
评论:
请先登录,才能进行评论