记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:7:2: error: variable-sized object may not be initialized
  int a[n]={0};
  ^~~
/in/foo.c:7:12: warning: excess elements in array initializer
  int a[n]={0};
            ^
/in/foo.c:7:12: note: (near initialization for 'a')
/in/foo.c:13:3: warning: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   swap (a[j],a[j-1]);
   ^~~~
/in/foo.c:16:4: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    if(a[i]=a[i+1])
    ^~
/in/foo.c:25:2: error: expected ';' at end of input
  return 0
  ^~~~~~
/in/foo.c:25:2: error: expected declaration or statement at end of input

信息

递交者
类型
递交
题目
P1000 明明的随机数
语言
C
递交时间
2021-11-12 19:29:11
评测时间
2021-11-12 19:29:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes