title: Same random numbers every loop iteration
body: <p>I have a <code>for</code> loop that runs 15 times, with <code>dh.setDoors()</code> in every iteration.</p>
  
  <p>What <code>setDoors</code> does is call <code>srand(time(0))</code>, then whenever a random number is needed it'll use, for example, <code>carSetter = rand()%3+1</code>. Alternatively, it may use <code>decider = rand()%2+1</code>.</p>
  
  <p>Now, normally <code>decider</code> and <code>carSetter</code> are used in a different ways, but I suspected a problem and made it print out <code>carSetter</code> and <code>decider</code> at every iteration. Here's what came out:</p>
  
  <pre><code>Door 1 has car
  Decider is 2
  Door 1 has car
  Decider is 2
  Door 1 has car
  Decider is 2
  Door 1 has car
  Decider is 2
  Door 1 has car
  Decider is 2
  etc...
  </code></pre>
  
  <p>The values '1' and '2' change when I run it multiple times, but are still the same throughout the 15 times.</p>
  
  <p>Since the loop is running 15 different times, shouldn't <code>carSetter</code> and <code>decider</code> print out a different random number every iteration?</p>
  
  <p>When I don't have <code>srand(time(0))</code>, it works as expected, but there's no seed set, so it's the same sequence of "random" numbers each time, so it's probably a problem with the seed?</p>