记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:21: warning: variable 'x' set but not used [-Wunused-but-set-variable]
    5 |         int n,i,min,x;
      |                     ^
foo.c:5:17: warning: unused variable 'min' [-Wunused-variable]
    5 |         int n,i,min,x;
      |                 ^~~
foo.c: At top level:
foo.c:34:5: error: redefinition of 'main'
   34 | int main(){
      |     ^~~~
foo.c:3:5: note: previous definition of 'main' with type 'int()'
    3 | int main()
      |     ^~~~
foo.c: In function 'main':
foo.c:36:15: error: 'n' undeclared (first use in this function)
   36 |         int a[n];
      |               ^
foo.c:36:15: note: each undeclared identifier is reported only once for each function it appears in
foo.c:38:13: error: 'i' undeclared (first use in this function)
   38 |         for(i=0; i<n; i++)
      |             ^
foo.c:41:22: error: 'x' undeclared (first use in this function)
   41 |         scanf("%d", &x);
      |                      ^
foo.c:36:13: warning: unused variable 'a' [-Wunused-variable]
   36 |         int a[n];
      |             ^
foo.c: In function 'Search':
foo.c:60:1: warning: control reaches end of non-void function [-Wreturn-type]
   60 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A7-3 数组的极值下标函数
比赛
2022年迎新赛(第三场)
语言
C
递交时间
2022-09-16 20:59:35
评测时间
2022-09-16 20:59:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes