UVA 10195 - The Knights Of The Round Table

UVA Sep 01, 2020

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

Tags

Shipu Ahamed

CSPO® | Partly Product, Project Manager and Partly Software Engineer.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.