title: Find the GCD of two numbers without using divison or mod operator?
body: <p>I want to find GCD of two numbers but without using division or mod operator.
  one obvious way would be to write own mod function like this:</p>
  
  <pre><code>enter code here
  int mod(int a, int b)
  {
     while(a&gt;b)
         a-=b;
  
  return a;
  }
  </code></pre>
  
  <p>and then use this function in the euclid algorithm.
  Any other way ??</p>