foo.c:1:6: warning: return type of 'main' is not 'int' [-Wmain]
void main()
^
foo.c: In function 'main':
foo.c:8:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
scanf("%d",&s[i]);
^
foo.c:8:9: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:10:9: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
scanf("%d",&hmax);
^
foo.c:19:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
printf("%d",n);
^
foo.c:19:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
foo.c:19:5: error: expected declaration or statement at end of input