fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4.  
  5.  
  6. int main(void){
  7.  
  8. double a,b,c;
  9. a=3;
  10. b=4;
  11. c=5;
  12.  
  13.  
  14. double p=(a+b+c)/2;
  15. double t,s;
  16. t=p*(p-a)*(p-b)*(p-c);
  17. s=sqrt(t);
  18.  
  19. printf("%f",s);
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
6.000000