'''程序功能:判断3个数值中最大值'''x_str = input("请输入X: ")while True: if not x_str.isdecimal(): x_str = input("检测到您输入非数字,请重新输入数字X: ") else: breaky_str = input("请输入Y: ")while True: if not y_str.isdecimal(): y_str = input("检测到您输入非数字,请重新输入数字Y: ") else: breakz_str = input("请输入Z: ")while True: if not z_str.isdecimal(): z_str = input("检测到您输入非数字,请重新输入数字Z: ") else: breakx = int(x_str)y = int(y_str)z = int(z_str)if x >= y: temp = x if temp >= z: print("X,Y,Z中最大数为X = " + str(temp)) else: print("X,Y,Z中最大数为Z = " + str(z))else: temp = y if temp >= z: print("X,Y,Z中最大数为Y = " + str(temp)) else: print("X,Y,Z中最大数为Z = " + str(z))