#include
#include
int main(void){
float x1,y1,x2,y2,x3,y3;
float p,a,b,c,S;
printf("input three coordinates to calculate the area of the triangle:");
scanf("%f%f%f%f%f%f",&x1,&y1,&x2,&y2,&x3,&y3);
a=sqrtf((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
b=sqrtf((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
c=sqrtf((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3));
if(a>b)
{t=a;a=b;b=t;}
if(a>c)
{t=a;a=c;c=t;}
if(b>c)
{t=b;b=c;c=t;}
if(c=a+b)
{printf("These three line segments can't be combined to be a triangle")}
else if(c>a+b)
{ p=(a+b+c)/(2.0);
S=sqrtf(p*(p-a)*(p-b)*(p-c));
printf("The area of the triangle is:%.2f",S);
}
return 0;
}