title: Why is my last digit being omitted while reversing?
body: <p>I'm trying to reverse print a number. So far my code is ..
  The reason I put <code>&gt; 10</code> was that because if I have a number  89 % 10 => I get 9 but for something less than 10 like 7 % 10 =>  I get 0</p>
  
  <pre><code>int reverse_num(unsigned long int offset) {
      int revnum = 0;
      while(offset &gt; 10){
          int remainder = offset % 10;
          revnum = (revnum * 10) + remainder;
          offset = (offset - remainder) /10.0;
      }
      return revnum ;
  }
  </code></pre>
  
  <p>But the problem is if I pass in the actual parameter as 8963 , it is returning 369. i.e, it's omitting 8 . But why ? </p>