fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. int main()
  5. {
  6. int x,i,n;
  7. double mediaH,soma;
  8. int conjunto[100];
  9.  
  10. scanf("%d",&n);
  11. for(i=0;i<100;i++) {
  12. scanf("%d",&x);
  13. conjunto[i]= x;
  14. }
  15. soma=0;
  16. for(i=0;i<100;i++) {
  17. soma=soma+1/conjunto[i];
  18. }
  19. mediaH=n/soma;
  20. printf("%f",mediaH)
  21. }
  22. return 0;
  23. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:21:1: error: expected ‘;’ before ‘}’ token
 }
 ^
prog.c: At top level:
prog.c:22:1: error: expected identifier or ‘(’ before ‘return’
 return 0;
 ^
prog.c:23:1: error: expected identifier or ‘(’ before ‘}’ token
 }
 ^
prog.c: In function ‘main’:
prog.c:21:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
stdout
Standard output is empty