foo.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
2 | void main()
| ^~~~
foo.c: In function 'main':
foo.c:4:8: error: 'n' undeclared (first use in this function)
4 | int a[n];
| ^
foo.c:4:8: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:17: warning: variable 'n' set but not used [-Wunused-but-set-variable]
5 | int number,i,j,n;
| ^
foo.c:4:6: warning: unused variable 'a' [-Wunused-variable]
4 | int a[n];
| ^
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%d",&number);
| ^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务