fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. struct hen{
  4. int a;
  5. int b;
  6. int c;
  7. };
  8.  
  9.  
  10. int main(void) {
  11. struct hen k={3,4,5};
  12.  
  13. int s;
  14. int S;
  15. s=(k.a+k.b+k.c)/2;
  16. S=sqrt(s*(s-k.a)*(s-k.b)*(s-k.c));
  17. printf("%d" ,S);
  18.  
  19.  
  20.  
  21.  
  22. // your code goes here
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
6