/*****COPYRIGHT BY MICHAEL DIDRUX OVDIIENKO CODE O.V MATVIY, 101-B, ChNU, 2020
*****/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
printf("Type each point of A,B,C\n");
double per,ax,ay,bx,by,cx,cy,ab,ac,bc;
printf("Point A(x1,y1) --> ");
scanf("%lf%lf",&ax,&ay);
printf("Point B(x2,y2) --> ");
scanf("%lf%lf",&bx,&by);
printf("Point C(x3,y3) --> ");
scanf("%lf%lf",&cx,&cy);
ab = sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by));
ac = sqrt((ax-cx)*(ax-cx)+(ay-cy)*(ay-cy));
bc = sqrt((cx-bx)*(cx-bx)+(cy-by)*(cy-by));
per = (ab+bc+ac)/2;
if (!((ay >= 2*ax*ax && ay <= 2-ax*ax) && (by >= 2*bx*bx && by <= 2-bx*bx) && (cy >= 2*cx*cx && cy <= 2-cx*cx))){
printf("Point's doesn't on the area\n");
}
else if (ab + bc == ac || ac+ bc == ab || ab+ac == bc){
printf("Points on one line\n");
}
else
printf("S = %.2f\n", sqrt(per*(per-ab)*(per-bc)*(per-ac)));
return 0;
}