Wednesday, July 8, 2015

[Reverse number]



number=input("Enter a")
reverse =0
while number >0 :
 reverse=reverse * 10
 reverse = reverse + number % 10
 number=number / 10
print "Reversed Number"
print reverse

No comments:

Post a Comment