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