num=int(input("请输入一个数:")) reverseNum=0 while(num): reverseNum=reverseNum*10+num%10 num=num//10 print("它的逆序数:",reverseNum)