title: Random Number Generator not working
body: <p>I use this function to create random numbers between 100000000 and 999999999</p>
  
  <pre><code>int irand(int start, int stop) {
    double range = stop - start + 1;
    return start + (int)(range * rand()/(RAND_MAX+1.0));
  }
  </code></pre>
  
  <p>When I use it like this, it's properly working</p>
  
  <pre><code>while(1) {
      DWORD dw = irand(100000000, 999999999);
      printf("dynamic key: %d\n", dw);
      Sleep(100);
  }
  </code></pre>
  
  <p>But when I use this function without the while(1), I always get the same number.
  What do I need to fix?</p>