foo.c: In function 'main':
foo.c:5:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
int n; scanf("%d",n);
~^
foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
int k; scanf("%d",k);
~^
foo.c:9:2: warning: statement with no effect [-Wunused-value]
for(i;i<n;i++)
^~~
foo.c:11:11: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
scanf("%d",a[i]);
~^ ~~~~
foo.c:16:2: warning: statement with no effect [-Wunused-value]
for(m;m<=k-2;m++)
^~~
foo.c:5:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
int n; scanf("%d",n);
^~~~~~~~~~~~~
foo.c:6:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
int k; scanf("%d",k);
^~~~~~~~~~~~~
foo.c:11:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",a[i]);
^~~~~~~~~~~~~~~~
foo.c:5:9: warning: 'n' is used uninitialized in this function [-Wuninitialized]
int n; scanf("%d",n);
^~~~~~~~~~~~~
foo.c:6:9: warning: 'k' is used uninitialized in this function [-Wuninitialized]
int k; scanf("%d",k);
^~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务