title: Which is the best way, in C, to see if a number is divisible by another?
body: <p>Which is the best way, in C, to see if a number is divisible by another? I use this:</p>
  
  <pre><code>if (!(a % x)) {
  // this will be executed if a is divisible by x
  }
  </code></pre>
  
  <p>Is there anyway which is faster? I know that doing, i.e, 130 % 13 will result into doing 130 / 13 per 10 times. So there are 10 cycles when just one is needed (I just want to know if 130 is divisible by 13).</p>
  
  <p>Thanks!</p>