10195 - The Knights Of The Round Table
#include<bits/stdc++.h>
using namespace std;
#define pi 3.141592653589793
int main()
{
double a,b,c;
while(scanf("%lf%lf%lf",&a,&b,&c)!=EOF)
{
if(a+b+c==0)
printf("The radius of the round table is: 0.000\n");
else
{
double s,r;
s=(a+b+c)/2;
r=(s-a)*(s-b)*(s-c)/s;
printf("The radius of the round table is: %.3lf\n",sqrt(r));
}
}
return 0;
}
0 comments :
Post a Comment