发布网友 发布时间:2023-07-09 09:38
共1个回答
热心网友 时间:2023-10-02 13:54
python代码和运行结果如下:
输出符合样例,望采纳~
附源码:
l = []
maxn, minn, sumn = 0, 100, 0
for i in range(0, 10):
n = int(input())
l.append(n)
maxn = max(maxn, n)
minn = min(minn, n)
sumn += n;
l.sort(reverse=True) # 降序排列
for i in range(0, 10):
print(l[i], end=' ')
print() # 换行
print('max=%d min=%d average=%.2f' % (maxn, minn, sumn/10))