标签:
0 0 1 1 1 3 0 1 1 0 0 0 0 0 0 0 0 0
1.0 0.5
xi=x1-x3;
yi=y1-y3;
xj=x2-x3;
yj=y2-y3;
#include<stdio.h> #include<math.h> #define LL long long int main() { int x1,x2,x3,y1,y2,y3; double sum; double xi,yi,xj,yj; while(scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3)) { if(x1==0&&y1==0&&x2==0&&y2==0&&x3==0&&y3==0) break; xi=x1-x3; yi=y1-y3; xj=x2-x3; yj=y2-y3; sum=fabs(xi*yj-yi*xj)/2.0; printf("%.1lf\n",sum); } }
标签:
原文地址:http://www.cnblogs.com/tonghao/p/4708967.html