foo.cc: In function 'int main()':
foo.cc:6:9: warning: zero-length gnu_printf format string [-Wformat-zero-length]
6 | printf("");
| ^~
foo.cc:8:9: warning: zero-length gnu_printf format string [-Wformat-zero-length]
8 | printf("", n);
| ^~
foo.cc:17:9: warning: too many arguments for format [-Wformat-extra-args]
17 | printf("%d\n", a[index], index);
| ^~~~~~
foo.cc:7:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
7 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
foo.cc:11:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
11 | scanf("%d", &a[i]);
| ~~~~~^~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务