| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
注意!!!%lf输入%f输出!这是必要的!不然你看着办!#include <stdio.h>
#include <math.h>
#define PI 3.141592653589793
double a[3][2];
int main()
{
double a1,b1,c1,p,area,d;
int i;
while(scanf("%lf%lf%lf%lf%lf%lf",&a[0][0],&a[0][1],&a[1][0],&a[1][1],&a[2][0],&a[2][1])!=EOF)
{
a1=sqrt((a[0][0]-a[1][0])*(a[0][0]-a[1][0])+(a[0][1]-a[1][1])*(a[0][1]-a[1][1]));
b1=sqrt((a[0][0]-a[2][0])*(a[0][0]-a[2][0])+(a[0][1]-a[2][1])*(a[0][1]-a[2][1]));
c1=sqrt((a[1][0]-a[2][0])*(a[1][0]-a[2][0])+(a[1][1]-a[2][1])*(a[1][1]-a[2][1]));
p=(a1+b1+c1)/2;
area=sqrt(p*(p-a1)*(p-b1)*(p-c1));
d=(a1*b1*c1)/(2*area);
printf("%.2f\n",d*PI);
}
return 1;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator