fork(1) download
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main(void) {
  4. // your code goes here
  5. double a,b;
  6. double c,d,e;
  7. scanf("%lf %lf %lf",&c,&d,&e);
  8. b=(c+d+e)/2;
  9. a=sqrt(b*(b-c)*(b-d)*(b-e));
  10. printf("s=%.2f",a);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 5324KB
stdin
3 4 5
stdout
s=6.00