title: How can I generate random numbers between 1 and a number input by the user?
body: <p>How do I create a program that generates ten random numbers from 1 -&gt; <code>RAND_MAX</code>?</p>
  <p><code>RAND_MAX</code> must be a number input by the user.</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdlib.h&gt;
  
  int main()
  {
      using namespace std;
      int x;
      int y;
  
  
      Random:
      {
          x = rand();
          cout &lt;&lt; x &lt;&lt; endl;
      }
  
      y = y + 1;
      if (y == 10) {
          return 0;
      }
  
      goto Random;
  }
  </code></pre>