~cpp
#include <iostream>
#include <math.h>
using namespace std;

void process(double a, double b, double c)
{
	double s = (a+b+c)/2.0;
	if(a == 0.0 && b ==0.0 && c==0.0)
		cout << "The radius of the round table is: 0.000" << endl;
	else
	{
		double temp = 2.0*sqrt(s*(s-a)*(s-b)*(s-c))/(a+b+c);
		cout <<  "The radius of the round table is: " << temp << endl;
	}
}

int main()
{
    cout.setf(ios::fixed, ios::floatfield);   
    cout.setf(ios::showpoint);   
    cout.precision(3); 

	double a,b,c;

	while(cin >> a >> b >> c)
	{
		process(a,b,c);
	}

	return 0;
}
Retrieved from http://wiki.zeropage.org/wiki.php/TheKnightsOfTheRoundTable/김상섭
last modified 2021-02-07 05:28:13