foo.c: In function 'main':
foo.c:13:30: error: conflicting types for 'a'
13 | int s,i,j,k,n,a[100],b[100],a,b;
| ^
foo.c:13:16: note: previous declaration of 'a' was here
13 | int s,i,j,k,n,a[100],b[100],a,b;
| ^
foo.c:13:32: error: conflicting types for 'b'
13 | int s,i,j,k,n,a[100],b[100],a,b;
| ^
foo.c:13:23: note: previous declaration of 'b' was here
13 | int s,i,j,k,n,a[100],b[100],a,b;
| ^
foo.c:17:19: error: subscripted value is neither array nor pointer nor vector
17 | scanf("%d %d",&b[i],&a[i]);
| ^
foo.c:17:25: error: subscripted value is neither array nor pointer nor vector
17 | scanf("%d %d",&b[i],&a[i]);
| ^
foo.c:19:14: error: subscripted value is neither array nor pointer nor vector
19 | sum2=sum2*a[i];
| ^
foo.c:22:6: error: subscripted value is neither array nor pointer nor vector
22 | k=b[i];
| ^
foo.c:24:9: error: subscripted value is neither array nor pointer nor vector
24 | k=k*a[j];
| ^
foo.c:25:8: error: subscripted value is neither array nor pointer nor vector
25 | k=k/a[i];
| ^
foo.c:15:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
15 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务