x = int(input('请输入第一个整数:')) y = int(input('请输入第二个整数:')) z = int(input('请输入第三个整数:'))

if x >= y and x >= z: if y >= z: print(x, y, z) else: print(x, z, y) elif y >= x and y >= z: if x >= z: print(y, x, z) else: print(y, z, x) else: if x >= y: print(z, x, y) else: print(z, y, x)

Python 程序:排序三个整数

原文地址: https://www.cveoy.top/t/topic/nBZV 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录