记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
6-1 和为定值的数对
比赛
2021(四) 作业第四场:加速赛
语言
C
递交时间
2021-12-08 20:38:29
评测时间
2021-12-08 20:38:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes