title: C++ function to preform division
body: <p>Im trying to make a function that does division with out the / symbol</p>
  
  <pre><code>long  q(int nm1, int nm2)
  {
    long q = 0;
  
     while ( num1 &gt; num2)
      {
      some subtraction here    
      }
  return q;
  
  }
  </code></pre>
  
  <p>the idea is to assume the input is in order and the first is to be divided by the second.
  This means subtract the second from the first until the second is less then the first number.</p>
  
  <p>I tried many different ways to do this but for what ever reason I cant hit it.</p>
  
  <p>For now I am assuming the number is positive and wont return division by zero (I can fix that later by calling my other functions)</p>