记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:4:2: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
  scanf("%d\n",&n);
  ^~~~~
/in/foo.c:4:2: warning: incompatible implicit declaration of built-in function 'scanf'
/in/foo.c:4:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
/in/foo.c:8:4: error: 'i' undeclared (first use in this function)
  b[i]=a[i];
    ^
/in/foo.c:8:4: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:21:2: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
  printf("%d",count/2);
  ^~~~~~
/in/foo.c:21:2: warning: incompatible implicit declaration of built-in function 'printf'
/in/foo.c:21:2: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:5:15: warning: variable 'b' set but not used [-Wunused-but-set-variable]
  int a[10000],b[10000];
               ^

信息

递交者
类型
递交
题目
4 排序中的交换次数
比赛
小兰赛 2018/12/2
语言
C
递交时间
2018-12-02 08:46:45
评测时间
2018-12-02 08:46:45
评测机
分数
0
总耗时
9ms
峰值内存
2.551 MiB