max_num = int(input('请输入一个数:')) while True: num = int(input('请在输入一个数:')) if num > max_num: max_num = num else: if num == 0: break print(max_num)
max_num = int(input('请输入一个数:')) while True: num = int(input('请在输入一个数:')) if num > max_num: max_num = num else: if num == 0: break print(max_num)