#include<stdio.h>
#include<math.h>
#define pi 2*acos(0)
int main()
{
double x1,y1,x2,y2,x3,y3,a,b,c,s,A,r,cmf;
freopen("a.in","r",stdin);
while(scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3)==6)
{
a=sqrt(pow((x1-x2),2)+pow((y1-y2),2));
b=sqrt(((x2-x3)*(x2-x3))+((y2-y3)*(y2-y3)));
c=sqrt(((x3-x1)*(x3-x1))+((y3-y1)*(y3-y1)));
s=(a+b+c)/2;
A=sqrt(s*(s-a)*(s-b)*(s-c));
r=(a*b*c)/(4*A);
cmf=2*pi*r;
printf("%.2lf\n",cmf);
}
return 0;
}
No comments:
Post a Comment