回复 3楼 八画小子
代码找不到了,就临时写一个
#include"stdio.h"
#include"math.h"
int main()
{
int x1,y1,x2,y2,x3,y3;
float a,b,c,p;
scanf("%d %d %d %d %d %d",&x1,&y1,&x2,&y2,&x3,&y3);
a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
b=sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
c=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
p=(a+b+c)/2;
if(a+b>c&&a+c>b)printf("L = %.2f, A = %.2f",a+b+c,sqrt(p*(p-a)*(p-b)*(p-c)));
else printf("Impossible\n");
return 0;
}