# a def a(): num = int(input('请输入一个整数:')) return num # b def b(num): for i in range(1, num+1): print(i) num = a() b(num)