fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct{
  4. int a;
  5. int b;
  6. int c;
  7. }tri;
  8.  
  9. int main(void)
  10. {
  11.  
  12. tri data={5,5,5};
  13. double r;
  14. r=(data.a+data.b+data.c)/2.0;
  15. printf("%f",r);
  16. }
  17.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
7.500000