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