title: pulling cards at random until getting one of each
body: <p>1 of 10 different cards, randomly distributed, in each box
  Any one collecting all 10 cards at the end of the first 21 days will receive 2 weeks paid vacation
  every day until Johnny collects all 10 cards.
  How many boxes of cereal must Johnny’s mother purchase to collect at least one of each card?
  At the end of the program display a sentence indicating whether or not Johnny won the trip. Run the program a few times and compare the results.</p>
  <p>it prints out only 01 and 0 for sum of cards dont know why the loop isn't doing the right values.</p>
  <pre><code>    import java.util.Random;
    public class Cereal{
  
  
   public static void  main(String []args) {
  String [] wCards = {&quot;eevee&quot;,&quot;jirachi&quot;,&quot;pichu&quot;,&quot;Taillow&quot;,&quot;flying pikachu&quot;,&quot;Togekiss&quot;,&quot;Blastoise&quot;,&quot;raichu&quot;,&quot;flareon&quot;,&quot;lanturn&quot;};
  int e=0,j=0,p=0,t=0,fp=0,toge=0,b=0,r=0,f=0,l=0,sum=0,pull;
  int[] pokeCards= {e,j,p,t,fp,toge,b,r,f,l};
  Random rand = new Random(10);
  boolean card = false;
  
  while (card == false) {
       pull = rand.nextInt();
              if(pull ==0) 
              e++;
              if(pull == 1) 
                  j++;
              if(pull== 2)
                  p++;
              if(pull == 3)
                  t++;
              if(pull == 4)
                  fp++;
              if(pull == 5) 
                  toge++;
              if(pull == 6) 
                  b++;
              if(pull == 7) 
                  r++;
              if(pull == 8) 
                  f++;
              if(pull== 9) 
                  l++;    
  
      for(int i =0; i &lt; pokeCards.length; i++) { 
                  if(pokeCards[i] &gt;= 0) {
                      card = true;}
      
                      sum+= pokeCards[i];
                      
                  }
  
  System.out.println(&quot;Acme Cereal Inc. Disney World Contest Simulation\n&quot;);
  System.out.println(&quot;Total number of boxes of cereal purchased : &quot; + sum);
  System.out.println(&quot;Card#\tCArd\tNumber of cards collected&quot;);
  for(int k=0; k &lt; wCards.length;k++) {
      System.out.println(k+1 + &quot;\t&quot; + wCards[k] + &quot;\t\t&quot; + pokeCards[k]+1);
  }
          if(sum&lt;21){
              System.out.println(&quot;You won a Vacation&quot;);
          }else {
                  System.out.println(&quot; sorry no Vacation&quot;);
          }
     }
   }
  }
  </code></pre>