#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
double x1,y1,x2,y2,x3,y3;
while(cin>>x1>>y1>>x2>>y2>>x3>>y3)
{
double L1=sqrt(pow(x1-x2,2.0)+pow(y1-y2,2.0));
double L2=sqrt(pow(x1-x3,2.0)+pow(y1-y3,2.0));
double L3=sqrt(pow(x2-x3,2.0)+pow(y2-y3,2.0));
double p=(L1+L2+L3)/2;
double s=sqrt(p*(p-L1)*(p-L2)*(p-L3));
double h=s*2/L3;
double d=L1*L2/h;
double L=d*3.141592653589793;
cout<<fixed<<setprecision(2)<<L<<endl;
}
return 0;
}
1117:计算圆的周长
最新推荐文章于 2017-05-30 21:17:01 发布