foo.c:1:6: warning: return type of 'main' is not 'int' [-Wmain]
1 | void main()
| ^~~~
foo.c: In function 'main':
foo.c:3:16: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | int n; scanf("%d\n", &n);
| ^~~~~
foo.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | void main()
foo.c:3:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | int n; scanf("%d\n", &n);
| ^~~~~
foo.c:3:16: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:7:15: warning: comparison of constant '100000' with boolean expression is always true [-Wbool-compare]
7 | if(0<n<100000){if(0<x<=1000){
| ^
foo.c:7:13: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
7 | if(0<n<100000){if(0<x<=1000){
| ~^~
foo.c:7:30: warning: comparison of constant '1000' with boolean expression is always true [-Wbool-compare]
7 | if(0<n<100000){if(0<x<=1000){
| ^~
foo.c:7:28: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
7 | if(0<n<100000){if(0<x<=1000){
| ~^~
foo.c:16:17: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
16 | } printf("%d\n",y);
| ^~~~~~
foo.c:16:17: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:16:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
foo.c:16:17: note: include '<stdio.h>' or provide a declaration of 'printf'
[Hydro](https://hydro.ac)提供评测服务