num1 = int(input('请输入第一个数字:')) num2 = int(input('请输入第二个数字:')) num3 = int(input('请输入第三个数字:'))

if num1 > num2 and num1 > num3: print('第一个数字最大:', num1) elif num2 > num1 and num2 > num3: print('第二个数字最大:', num2) else: print('第三个数字最大:', num3)

Python 比较三个数字大小的代码示例

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

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