fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. double a , b, c;
  6. cin >> a >> b >> c;
  7. double p = ( a + b + c ) / 2;
  8. cout << fixed << setprecision(6) << sqrt( p * ( p - a ) * ( p - b ) * ( p - c ));
  9. }
Success #stdin #stdout 0s 5312KB
stdin
3 4 5
stdout
6.000000