title: Java/Demorgan's Law/Boolean Algebra/Random Dice/
body: <p>I need some help getting this code to work. </p>
  
  <p>I need to be able to Write a program that counts how many times three six-sided dice must be rolled until the values showing are all different.</p>
  
  <p><strong>Instructions:</strong></p>
  
  <p>Write a driver that generates 10 output runs.</p>
  
  <p>Here is an example of two output runs.</p>
  
  <pre><code>2 6 5
  
  count = 1
  
  5 3 5
  
  3 5 3
  
  3 3 4
  
  1 3 3
  
  2 5 4
  
  count = 5
  </code></pre>
  
  <p>Here is my code so far, I don't exactly know where and how to apply DeMorgan's law to this.</p>
  
  <pre><code>import java.util.Random;
   public class P4_Icel_Murad_Rolling
  {
      public static void main(String[] args){
          P4_Icel_Murad_Rolling obj = new P4_Icel_Murad_Rolling();
          obj.rolling(10);
      }
  
      public void rolling(int number){
          int counter = 0;
          Random num = new Random();
          for(int i = 0; i &lt; number; i++){
            int A = num.nextInt(6);
            System.out.print(A + " ");
            int B = num.nextInt(6); 
            System.out.print(B + " ");
            int C = num.nextInt(6); 
            System.out.print(C + " ");
            if((){
              counter++;
              }
            System.out.println();
          }        
      }
  
  
  }
  </code></pre>