Challenge: Reverse the digits of a non-integral number. For instance 12.46 should become 64.21 as an example. Another one would be 3.78 should become 87.3.
Rules:
-
You cannot convert the number to another type, like a string and just reverse the string.
-
The non-integral type must be preserved, so if you float for instance the output should be float. Likewise for double.
-
It must be decimal.