title: How to include negative numbers in random number generation
body: <p>Is this the correct way to generate a random number from (-1, 36)?:</p>
  
  <pre><code>  #include &lt;stdio.h&gt;
    #include &lt;stdlib.h&gt;
    #define RAND_MAX 36
  
    int main()
    {           
        int num = (-1) + (36 + 1) * (rand()/(RAND_MAX+1));
        printf("%d\n", num);
        return 0;
    }
  </code></pre>