记录详情

Compile Error

foo.c: In function 'fun':
foo.c:26:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
       if(a[j-1]!=a[i])
       ^~
foo.c:28:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   count++;
   ^~~~~
foo.c:30:2: warning: 'return' with no value, in function returning non-void
  return;
  ^~~~~~
foo.c:21:5: note: declared here
 int fun(int a[],int n)
     ^~~
foo.c: In function 'main':
foo.c:36:6: error: conflicting types for 'a'
  int a[N];
      ^
foo.c:35:16: note: previous declaration of 'a' was here
  int n,i,count,a;
                ^
foo.c:48:3: error: assignment to expression with array type
  a=fun(a,n);
   ^
foo.c:40:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&n);
   ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

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