Python程序:比较三个整数大小并排序输出
x, y, z = map(int, input().split())
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)
原文地址: https://www.cveoy.top/t/topic/nBZu 著作权归作者所有。请勿转载和采集!