您的位置:首页 > 其它

zoj1090

2013-02-28 10:25 155 查看
我想说,数学都忘完啦!

#include<iostream>
#include<cstdio>
#include<cmath>

using namespace std;

int main()
{
double x1,y1,x2,y2,x3,y3,a,b,c, sin, rel;
while(scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3) != EOF)
{
a = pow(x1 - x2, 2.0) + pow(y1 - y2, 2.0);//求边长的
b = pow(x1 - x3, 2.0) + pow(y1 - y3, 2.0);
c = pow(x2 - x3, 2.0) + pow(y2 - y3, 2.0);
sin = sqrt (1 - pow(a + b - c, 2.0)/(4 * a * b));
rel = 3.141592653589793 * sqrt(c) / sin;
printf("%.2lf\n", rel);
}
return 0;
}


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: