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. tri data={5,5,5};
  12. double r;
  13. r=(data.a+data.b+data.c)/2.0;
  14.  
  15. printf("%f",r);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
7.500000