#include<bits/stdc++.h> using namespace std; int main(){ double sum = 0,p; int a,c,b; while(cin>>a>>b>>c){ p = ( a + b + c ) * 1.0 / 2; sum = sqrt(p*(p-a)*(p-b)*(p-c)); printf("%.2lf\n",sum); } return 0; } |
Double click to view unformatted code.