标签:style blog io color os sp 数据 div on
0 0 1 1 1 3
0 1 1 0 0 0
0 0 0 0 0 0
1.0
0.5
1 #include <stdio.h> 2 #include <math.h> 3 4 int main(){ 5 int x1; 6 int y1; 7 int x2; 8 int y2; 9 int x3; 10 int y3; 11 double s; 12 13 while(1){ 14 scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3); 15 16 if(x1==0 && y1==0 && x2==0 && y2==0 && x3==0 && y3==0) 17 break; 18 19 s=fabs((double)x1*y2-x2*y1+x3*y1-x1*y3+x2*y3-x3*y2)/2; 20 21 printf("%.1lf\n",s); 22 } 23 24 return 0; 25 }
标签:style blog io color os sp 数据 div on
原文地址:http://www.cnblogs.com/zqxLonely/p/4100105.html