Given a triangle, what is the ratio of the area of its inscribed circle to that of its circum circle?

输入格式

9 integers x1 y1 z1 x2 y2 z2 x3 y3 z3 on one line (-1000 <= x,y,z <= 1000), the three coordinates of the triangle(they will not appear in the same line).
You should process the input until "EOF". Your code should be something like:
while(scanf("%f%f.....",&a,&b,....)!=EOF)/ C/C++ /
{Your code here.};
OR
while(cin >> a >>b ) / C++ /
{Your code here.};

输出格式

One ratio per line, exact to three digits to the right of the decimal point.

样例输入

0 0 0 0 0 1 0 1 0


#include<stdio.h>
#include<math.h>
int main(){
    int d[9];
    double a,b,c,p,s,w,n;
    while(scanf("%d %d %d %d %d %d %d %d %d",&d[0],&d[1],&d[2], &d[3],&d[4],&d[5], &d[6],&d[7],&d[8])!=EOF){
        a=sqrt((double)(pow((double)(d[0]-d[3]),2)+pow((double)(d[1]-d[4]),2)+pow((double)(d[2]-d[5]),2)));
        b=sqrt((double)(pow((double)(d[0]-d[6]),2)+pow((double)(d[1]-d[7]),2)+pow((double)(d[2]-d[8]),2)));
        c=sqrt((double)(pow((double)(d[6]-d[3]),2)+pow((double)(d[7]-d[4]),2)+pow((double)(d[8]-d[5]),2)));
        p=(a+b+c)/2;
        s=sqrt(p*(p-a)*(p-b)*(p-c));
        w=pow(a*b*c/(4*s),2);
        n=pow(2*s/(a+b+c),2);
        printf("%.3f\n",n/w);
    }
    return 0;
}