Example : Code Program num = int(input("Enter Number:")) temp = num rev = 0 while num > 0: rem = int(num%10) rev = rev * 10 + rem num = int(num/10) print("The reverse is : {}".format(rev))
Post a Comment