foo.c: In function 'main':
foo.c:6:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | scanf("%d",&a);
| ^~~~~
foo.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main()
foo.c:6:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
6 | scanf("%d",&a);
| ^~~~~
foo.c:6:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:6:5: warning: writing into constant object (argument 2) [-Wformat=]
foo.c:11:25: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
11 | printf("%d+%d=%d\n",b,c,a);
| ^~~~~~
foo.c:11:25: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:11:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
foo.c:11:25: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:7:14: warning: 'a' is used uninitialized [-Wuninitialized]
7 | for(b=1;b<a;b++){
| ~^~
foo.c:3:15: note: 'a' declared here
3 | const int a;
| ^
[Hydro](https://hydro.ac)提供评测服务