~cpp
#include <iostream> 
#include <cmath> 
using namespace std; 
void process(double a, double b, double c) 
{ 
    if((a+b+c) == 0) { 
        cout << "The radius of the round table is: 0.000" <<endl; 
    } else { 
        cout << "The radius of the round table is: "  
        << a*b*sqrt(1-pow((a*a + b*b - c*c)/ (2*a*b), 2)) / (a+b+c) << endl; 
    } 
} 

int main() 
{ 
    double a, b, c; 
    cout.setf(ios::fixed, ios::floatfield);      
    cout.setf(ios::showpoint);      
    cout.precision(3);    
     
    while(cin >> a >> b >> c) { 
        process(a, b, c); 
    } 
    return 0; 
}
TheKnightsOfTheRoundTable
Retrieved from http://wiki.zeropage.org/wiki.php/TheKnightsOfTheRoundTable/허준수
last modified 2021-02-07 05:28:12