title: Generate random number in range [min,max]
body: <p>I am using C to generate a integer random number in range [min max]. I am using </p>
  
  <pre><code>int random_int(int min, int max) 
  {
     return min + rand() % (max - min);
  }
  </code></pre>
  
  <p>But I think above code is for range : [min, max), it is not for [min max]. Could you show to me a code to do my work. Best thanks</p>