fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main(){
  4. float a,b,c;
  5. scanf ("%f%f%f",&a,&b,&c);
  6. double p;
  7. p=(a+b+c)/2;
  8. printf("%.6lf",sqrt(p*(p-a)*(p-b)*(p-c)));
  9. return 0;
  10. }
Success #stdin #stdout 0s 5312KB
stdin
3 4 5
stdout
6.000000