title: How does modulus and rand() work?
body: <p>So, I've been nuts on this.</p>
  
  <p>rand() % 6 will always produce a result between 0-5.</p>
  
  <p>However when I need between, let's say 6-12.</p>
  
  <p>Should I have rand() % 6 + 6</p>
  
  <pre><code>0+6 = 6.
  1+6 = 7.
  ...
  5+6 = 11. ???
  </code></pre>
  
  <p>So do I need to + 7 If I want the interval 6-12? But then, 0+7 =7. When will it randomize 6?</p>
  
  <p>What am I missing here? Which one is the correct way to have a randomized number between 6 and 12? And why? It seems like I am missing something here.</p>