There are multiple solutions and approaches on how to reverse the digits of a number. But as always i would only be showing the shortest possible way. On this example we would be reversing the digits of a number arrays and for loops.

Reverse Digit Example Sample Output :

Running above example source code will give the following result