class ReverseNumber
def reverse
input = 123
output = 0
remainder = 0
temp = input
while (temp > 0) do
remainder = temp % 10
output = (output * 10) + remainder
temp = temp / 10
end
puts("Original Number: " + input.to_s)
puts("Reverse Number: " + output.to_s)
end
end
obj = ReverseNumber.new
obj.reverse