n=int(input("Enter a number "))
c=0
while n>0:
b=n%10
c=c*10+b
n=n//10
print("The reversed number is",c)
Comments
Post a Comment