foo.c: In function 'main':
foo.c:5:5: error: 'cin' undeclared (first use in this function)
5 | cin>>n;
| ^~~
foo.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:10: error: 'n' undeclared (first use in this function)
5 | cin>>n;
| ^
foo.c:7:10: error: 'i' undeclared (first use in this function)
7 | for (i = 0; i < n; i++)
| ^
foo.c:11:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
11 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
foo.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | //19230322 李泽钦
foo.c:11:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
11 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
foo.c:11:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:11:27: error: 'a' undeclared (first use in this function)
11 | scanf("%d %d %d",&a,&b,&c);
| ^
foo.c:11:30: error: 'b' undeclared (first use in this function)
11 | scanf("%d %d %d",&a,&b,&c);
| ^
foo.c:11:33: error: 'c' undeclared (first use in this function)
11 | scanf("%d %d %d",&a,&b,&c);
| ^
foo.c:29:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
29 | printf("%d\n",B[i]);
| ^~~~~~
foo.c:29:9: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:29:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
foo.c:29:9: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:6:9: warning: variable 'B' set but not used [-Wunused-but-set-variable]
6 | int B[1000];
| ^
[Hydro](https://hydro.ac)提供评测服务