title: Generate Random numbers without using any external functions
body: <p>This was questions asked in one of the interviews that I recently attended.</p>
  
  <p>As far as I know a random number between two numbers can be generated as follows</p>
  
  <pre><code>public static int rand(int low, int high) {
      return low + (int)(Math.random() * (high - low + 1));
  }
  </code></pre>
  
  <p>But here I am using Math.random() to generate a random number between 0 and 1 and using that to help me generate between low and high. Is there any other way I can directly do without using external functions?</p>