title: Reverse an integer without losing 0's in input
body: <p>I have the following code that reverses an integer input. However, if I enter input with zeroes at the beginning e.g. 01234, it will return me the integer 4321 instead of 43210. I've looked at other solutions but they all solve the problem by getting the input as a String and then reversing the string. However, I need my input to be of type int.</p>
  
  <p>Does anyone have any ideas how I can solve this?</p>
  
  <pre><code>public static int reverseInputNumber(int num){
      int reverse = 0;
      while(num!=0) {
          reverse = (reverse*10)+num%10;
          num /= 10;
      }
      return reverse;
  }
  </code></pre>