number1 = input("请输入一个数字")
number2 = input("请输入一个数字")
number3 = input("请输入一个数字")
# isdigit()是用来判断输入的数据是否是整型
if number1.isdigit() and number2.isdigit() and number3.isdigit():
number1 = int(number1)
number2 = int(number2)
number3 = int(number3)
if number1 > number2:
if number2 > number3:
print("最大是:%i,中间值是:%i,最小值:%i" % (number1, number2, number3))
elif number3 > number2:
if number1 > number3:
print("最大是:%i,中间值是:%i,最小值:%i" % (number1, number3, number2))
else:
print("最大是:%i,中间值是:%i,最小值:%i" % (number3, number1, number2))
elif number1 < number2:
if number2 < number3:
print("最大是:%i,中间值是:%i,最小值:%i" % (number3, number2, number1))
elif number2 > number3:
if number3 > number1:
print("最大是:%i,中间值是:%i,最小值:%i" % (number2, number3, number1))
else:
print("最大是:%i,中间值是:%i,最小值:%i" % (number2, number1, number3))
else:
print("您输入的有误")