foo.c: In function 'counter':
foo.c:17:14: error: expected declaration specifiers or '...' before numeric constant
17 | int i,j,cnt(0);
| ^
foo.c:23:5: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
23 | cnt++;
| ^~~
| int
foo.c:23:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c: In function 'main':
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
9 | scanf("%d%d",&n,&m);
| ^~~~~~~~~~~~~~~~~~~
foo.c: In function 'counter':
foo.c:27:1: warning: control reaches end of non-void function [-Wreturn-type]
27 | }
| ^
foo.c: In function 'input':
foo.c:33:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
33 | scanf("%d",&serial[i]);
| ^~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务