Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- #define PI acos(-1)
- main()
- {
- long long int a,b,c;
- double R,r,s,d,e,f,g,h,i;
- while(scanf("%lld%lld%lld",&a,&b,&c)!=EOF)
- {
- s=(a+b+c)/2.0;
- r=sqrt(s*(s-a)*(s-b)*(s-c))/s;
- e=PI*r*r;
- f=sqrt(s*(s-a)*(s-b)*(s-c));
- R=(a*b*c)/(4*f);
- g=PI*R*R;
- h=g-f;
- i=f-e;
- printf("%.4lf %.4lf %.4lf\n",h,i,e);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment