Python Program to Reverse a Number
In this program we will print the reverse of a given number.
- #Reverse a number
-
- a=int(input("Enter an integer: "))
-
- reverse=0
-
- while(a is not 0):
- rem = a%10
- reverse = reverse*10 + rem
- a //= 10
-
- print("Reverse of the number is: ", reverse)
Output

Solution not working or have any suggestions? Please send an email to [email protected]
Download Android App