banda>c:print(f"{a}max")elifb>aandb>c:print(f"{b}max")else:print(f "{c}Maximum") After the user inputs three integers, the program will compare">
You can use the following code to determine the size of three numbers:
a = int(input("请输入第一个整数:")) b = int(input("请输入第二个整数:")) c = int(input("请输入第三个整数:")) if a > b and a > c: print(f"{a}最大") elif b > a and b > c: print(f"{b}最大") else: print(f"{c}最大")
After the user inputs three integers, the program will compare the sizes of the three numbers and output the largest number.
The above is the detailed content of How to determine the size of three numbers in Python. For more information, please follow other related articles on the PHP Chinese website!