title: Custom rand() function return the same value
body: <p>For reference, I followed this <a href="https://stackoverflow.com/questions/2509679/how-to-generate-a-random-number-from-within-a-range-c">thread</a>.</p>
  
  <p>I call this function from the <code>main()</code> function which return a random value in range <code>[0, N]</code> :</p>
  
  <pre><code>int randr(int min, int max) { int r = (rand() % (max+1-min)+min); return r; }
  </code></pre>
  
  <p>eg: </p>
  
  <pre><code>int main()
  {
  unsigned int r=128;
  while(r--)
  {
      int a = randr(0, 63);
      int b = randr(64, 127);
      printf("%d   %d\n", a, b);
  }
  return 0;
  }
  </code></pre>
  
  <p>The problem is, each time the program is executed, the variable <code>a</code> and <code>b</code> contain always the same generated value, why <em>(I mean it printf always the same data on the terminal)</em> ? </p>