UVA 10195 - The Knights Of The Round Table

Problem PDF

Solution:

#include
#include
int main ()
{
    double a,b,c,s,r;
    while(scanf("%lf%lf%lf",&a,&b,&c)==3)
    {
        if(a<=0||b<=0||c<=0)
        {
        printf("The radius of the round table is: 0.000\n");
        continue;
        }
        s=(a+b+c)/2;
        r=(sqrt(s*(s-a)*(s-b)*(s-c)))/s;
        printf("The radius of the round table is: %.3lf\n",r);
    }
 return 0;
}
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10195/10195.cpp