x=input('please input an integer of more than 3 digits:') try: x=int(x) x=x//100 if x==0: print('You must input an integer of more than 3 digits.') else: print(x) except BaseException: print('You must input an integer')
编写程序,用户输入一个位以上的整数,输出其百位以上的数字。例如用户输入1234.则程序输出12.
最新推荐文章于 2023-04-14 10:11:37 发布