foo.c: In function 'main':
foo.c:6:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | scanf("%d", &n);
| ^~~~~
foo.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
1 | #include <time.h>
+++ |+#include <stdio.h>
2 |
foo.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
6 | scanf("%d", &n);
| ^~~~~
foo.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:14:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
14 | printf("%d", i);
| ^~~~~~
foo.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:14:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
foo.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
[Hydro](https://hydro.ac)提供评测服务