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