¶
변 길가 때 각 내 반 구는 문다.
론 공 변로 는 구면
론 공 구 = (내 반 x 변 )/2 로 구 다.
론 공 변로 는 구면
¶
~cpp
#include <iostream>
#include <cmath>
using namespace std;
double a, b, c, halfSum;
void getRadius()
{
halfSum = (a+b+c)/2.0;
if(halfSum==0)
{
cout << "The radius of the round table is: 0.000"<<endl;
return;
}
cout << "The radius of the round table is: " << 1.0*sqrt(halfSum*(halfSum-a)*(halfSum-b)*(halfSum-c))/halfSum << endl;
}
int main()
{
cout.setf(ios::fixed, ios::floatfield);
cout.setf(ios::showpoint);
cout.precision(3);
while(cin>>a>>b>>c)
getRadius();
return 0;
}










