title: Alternative to using % operator and / Operator in C++
body: <p>It is told that modulo operator "%" and divide operator "/" are very inefficient in embedded C++.</p>
  
  <p>How can I alternatively achieve the following expression:</p>
  
  <pre><code>a = b % c;
  </code></pre>
  
  <p>I understand that this can be achieved using the following logic:</p>
  
  <pre><code>a = b - c;
  while (a &gt;= c) {
    a = a - c;
  }
  </code></pre>
  
  <p>But my question is, is this code involving while loops efficient enough, compared to % operator?</p>
  
  <p>Thanks,
  Kirti</p>