Sample Input
0 0 2 0 0 1 1 2 5 9 6 8
Sample Output
1.00 5.50
#include<iostream>
#include<stdio.h>
#include<cmath>
using namespace std;
int main()
{
double a[3][2];
while(cin>>a[0][0]>>a[0][1]>>a[1][0]>>a[1][1]>>a[2][0]>>a[2][1])
{
double c,d,x,y,l1,l2,B,s;
c=a[2][0]-a[0][0],d=a[2][1]-a[0][1];
l1=sqrt(c*c+d*d);
x=a[2][0]-a[1][0],y=a[2][1]-a[1][1];
l2=sqrt(x*x+y*y);
B=acos((c*x+d*y)/(l1*l2));
s=((double)sin(B)*l1*l2)/2;
printf("%.2f
",s);
}
return 0;
}