title: How to calculate a drop rate based on percentage
body: <p>I was torn between posting here and <code>math.stackexchange.com</code> but opted for here as it's equally programming related and I've not used <code>math.stackexchange.com</code> before.</p>
  
  <p>Basically I have 6 different items I'd like to 'drop' based on a percentage but I have no idea how to go about implementing this. Math isn't my strong suit either which doesn't help.</p>
  
  <p>Anyway, the percentages for items 1 through 6 are as follows:</p>
  
  <p><code>1%, 0.85%, 0.1%, 0.05%, 0.01%, 0.001%</code></p>
  
  <p>so item 1 has a 1% chance to drop, item 2 has a 0.85% chance to drop etc.</p>
  
  <p>And I one want 1 item to drop per run, if none of these 'chances' are met then a default item will be used instead. Consider these 6 items bonus items.</p>
  
  <p>So far i've tried this:</p>
  
  <pre><code>        Random rn = new Random();
  
      int x = rn.nextInt(100)+1;
  
      if(100%x==0)//1%
      {
  
      }
      if(100%(x*100)==0) //0.1%
      {
  
      }
  </code></pre>
  
  <p>which doesn't seem like a fair calculation and this:</p>
  
  <pre><code>    Random rn = new Random();
  
      int x = rn.nextInt(100000)+1;
  
      if(100%x==0)//1%
      {
  
      }
      if(8500%x==0) //0.1%
      {
  
      }
  </code></pre>
  
  <p>which seems even worse.</p>
  
  <p>I was thinking of using a random number for each item but thats a lot of <code>RNG</code> as it'll be running in a game loop.</p>
  
  <p>I've tried to keep this question as direct as possible to avoid debate etc so I'm not looking for the <strong>best</strong> solution, simply one that works - if any other information is needed, I'm happy to answer as long as it's n2k to help me with this problem =)</p>