最后的综合练习里,我做完平均分后一输出就报错,不输出就不会报错,其他的正常输出,输出平均分就报错
输出平均分用的是float,看了别人的照着打再输出还是会报错,反正不输出平均分就不报错气死我了,一直找不到问题
hello.c: In function 'main':
hello.c:6:19: warning: implicit declaration of function 'zongfen' [-Wimplicit-function-declaration]
printf("%d\n",zongfen(score));
^~~~~~~
hello.c:7:19: warning: implicit declaration of function 'zuigaof' [-Wimplicit-function-declaration]
printf("%d\n",zuigaof(score));
^~~~~~~
hello.c:8:19: warning: implicit declaration of function 'zuidif' [-Wimplicit-function-declaration]
printf("%d\n",zuidif(score));
^~~~~~
hello.c:10:19: warning: implicit declaration of function 'pingjunf' [-Wimplicit-function-declaration]
printf("%f\n",pingjunf(score));
^~~~~~~~
hello.c:10:14: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
printf("%f\n",pingjunf(score));
^
hello.c: At top level:
hello.c:47:7: error: conflicting types for 'pingjunf'
float pingjunf(int score[])
^~~~~~~~
hello.c:10:19: note: previous implicit declaration of 'pingjunf' was here
printf("%f\n",pingjunf(score));