#include<iostream>
using namespace std;
#include<cmath>
float dist(float Xa,float Ya,float Xb,float Yb)
{
return (float)sqrt((Xa-Xb)*(Xa-Xb)+(Ya-Yb)*(Ya-Yb));
}
void main()
{
float a,b,c,s,t;
float x1,y1,x2,y2,x3,y3;
cout<<"输入三角形的三个点:"<<" ";
cout<<endl;
cin>>x1>>y1>>x2>>y2>>x3>>y3;
a=dist(x1,y1,x2,y2);
b=dist(x1,y1,x3,y3);
c=dist(x2,y2,x3,y3);
s=(a+b+c)/2.0;
area=(float)sqrt(s*(s-a)*(s-b)*(s-c));
if(area==0)cout<<"三点不能构成三角形"<<endl;
else
cout<<"area="<<area<<endl;
}