Compile Error

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

信息

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