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:10:9: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
foo.c:19:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
printf("n=%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