记录详情

Compile Error

/in/foo.c:2:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sort'
 void selection sort(int array[],int length);
                ^~~~
/in/foo.c: In function 'main':
/in/foo.c:5:18: error: invalid initializer
  float score[30]=0;
                  ^
/in/foo.c:8:12: error: 'num' undeclared (first use in this function)
  for(i=0;i<num;i++)
            ^~~
/in/foo.c:8:12: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:10:12: warning: format '%lf' expects argument of type 'double *', but argument 2 has type 'float *' [-Wformat=]
   scanf("%lf",&score[i]);
            ^
/in/foo.c:13:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sort'
 void selection sort(int array[],int length)
                ^~~~
/in/foo.c:13:16: warning: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
/in/foo.c:13:21: error: expected expression before 'int'
 void selection sort(int array[],int length)
                     ^~~
/in/foo.c:14:1: error: expected ';' before '{' token
 {
 ^
/in/foo.c:23:1: error: expected declaration or statement at end of input
 }
 ^

信息

递交者
类型
递交
题目
P1001 数组--排序
语言
C
递交时间
2021-11-07 15:57:44
评测时间
2021-11-07 15:57:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes