提交记录 #367

提交时间:2024-12-03 08:37:49
语言:c 状态:CompileError
编译情况:编译错误
code.c: In function ‘sort’:
code.c:20:11: error: parameter name omitted
   20 | void sort(int*,int n,int flag){
      |           ^~~~
code.c:21:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘==’ token
   21 |     for(int i==0;i<n-1;i++){
      |              ^~
code.c:21:18: error: ‘i’ undeclared (first use in this function)
   21 |     for(int i==0;i<n-1;i++){
      |                  ^
code.c:21:18: note: each undeclared identifier is reported only once for each function it appears in
code.c:21:23: error: expected ‘)’ before ‘;’ token
   21 |     for(int i==0;i<n-1;i++){
      |        ~              ^
      |                       )
code.c:23:26: error: ‘arr’ undeclared (first use in this function)
   23 |             if((flag==0&&arr[j]>arr[j+1])||(flag==1;arr[j]<arr[j+1])){
      |                          ^~~
code.c:23:52: error: expected ‘)’ before ‘;’ token
   23 |             if((flag==0&&arr[j]>arr[j+1])||(flag==1;arr[j]<arr[j+1])){
      |                                            ~       ^
      |                                                    )
code.c: In function ‘output’:
code.c:39:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
   39 |     printf("%d,",&arr[i]);
      |             ~^   ~~~~~~~
      |              |   |
      |              int int *
      |             %ls
固定测试点暂不可用
... 等待中
time N/A
memory N/A
附加测试点暂不可用
... 不可用
time N/A
memory N/A
京ICP备2024093084 号