... HAVE U TRIED .... AT LEAST 3 TIMES ... OK U CAN SEE THIS ...

Tuesday, December 24, 2013

UVA-10195 :: The Knights Of The Round Table

#include <stdio.h>
#include <math.h>

int main ()
{
     double a,b, c , r ,at ,k ,x,y,z ;

     while (scanf ("%lf %lf %lf",&a,&b ,&c) == 3 )
     {
          k =  (a+b+c)/2.00 ;

          if (k>a) x= k-a ;
          else  x = a-k ;

          if (k>b) y= k-b ;
          else  y = b-k ;

          if (k>c) z = k-c ;
          else z = c-k ;

          at = sqrt (k*x *y * z) ;

          r = at /  k ;

          if (at == 0 && k==0) r= 0 ;
          printf ("The radius of the round table is: %.3lf\n",r) ;

     }

return 0 ;
}