foo.c:3:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sort'
void selection sort(int array[],int length);
^~~~
foo.c: In function 'main':
foo.c:6:18: error: invalid initializer
float score[30]=0;
^
foo.c:10:12: error: 'num' undeclared (first use in this function)
for(i=0;i<num;i++)
^~~
foo.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
foo.c:12:12: warning: format '%lf' expects argument of type 'double *', but argument 2 has type 'float *' [-Wformat=]
scanf("%lf",&score[i]);
~~^ ~~~~~~~~~
%f
foo.c:7:8: warning: unused variable 'n' [-Wunused-variable]
int i,n;
^
foo.c: At top level:
foo.c:16:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sort'
void selection sort(int array[],int length)
^~~~
foo.c: In function 'main':
foo.c:12:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lf",&score[i]);
^~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务