title: About the Remainder operator in ansi C
body: <p>I'm a student of Computer Science and I have a question about the remainder operator in C. I knew that the operator acts as follows:</p>
  
  <pre><code>7 % 4 //the result is 3
  </code></pre>
  
  <p>But I read a code in a book that was about programming a deck of cards in which the author used the remainder operator to fill the deck using 2 variables (faces are 13 and suits are 4) as follows:</p>
  
  <pre><code> for (i=0; i&lt;52; i++) {
       face=i%13; // face will have values from 0 to 12
  </code></pre>
  
  <p>I just can't figure out the logic of this computing. Can someone explain me this please?</p>