Advertisement
noshin98

uva 10195

Jul 14th, 2016
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5.     double a,b,c,s,r;
  6.     while(scanf("%lf%lf%lf",&a,&b,&c)==3)
  7.     {
  8.         if(a==0||b==0||c==0)
  9.  
  10.             printf("The radious of the round table is: 0.000\n");
  11.  
  12.  
  13.         else
  14.         {
  15.             s=(a+b+c)/2;
  16.             r=(s-a)*(s-b)*(s-c)/s;
  17.             r=sqrt(r);
  18.             printf("The radious of the round table is: %.3lf\n",r);
  19.  
  20.         }
  21.  
  22.     }
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement