Compile Error

/in/foo.c:2:1: error: unknown type name 'def'
 def ave(s):
 ^~~
/in/foo.c: In function 'ave':
/in/foo.c:2:11: error: expected declaration specifiers before ':' token
 def ave(s):
           ^
/in/foo.c:9:11: warning: character constant too long for its type
     print('max={:.2f}'.format(float(q)))
           ^~~~~~~~~~~~
/in/foo.c:10:11: warning: character constant too long for its type
     print('min={:.2f}'.format(float(w)))
           ^~~~~~~~~~~~
/in/foo.c:11:11: warning: character constant too long for its type
     print('average=',a/10)
           ^~~~~~~~~~
/in/foo.c:12:9: warning: character constant too long for its type
 s=input('请输入:').split()
         ^~~~~~~~~~~~~~
/in/foo.c:2:5: warning: type of 's' defaults to 'int' [-Wimplicit-int]
 def ave(s):
     ^~~
/in/foo.c:13:1: warning: control reaches end of non-void function [-Wreturn-type]
 ave(s)
 ^~~

信息

递交者
类型
递交
题目
N002:数组法求成绩max、min、average
题目数据
下载
语言
C
递交时间
2018-07-11 10:37:24
评测时间
2018-07-11 10:37:24
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes