Python 代码:找出输入数字中的最大值
n=int(input('请输入数字的个数:')) max=float(input('请输入第1个数:')) for k in range(2,n+1): x=float(input('请输入第{}个数:'.format(k))) if x>max: max=x print('输入的{}个数中最大值为:{}'.format(n,max))
原文地址: https://www.cveoy.top/t/topic/oKfU 著作权归作者所有。请勿转载和采集!