U E D R , A S I H C RSS

The Knights Of The Round Table/허준수

~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; 
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:12
Processing time 0.0163 sec