Anonymous
public java v1 · immutableclass RollDice2{ public static void main(String[] args) { Random R = new Random(); int c; int[] d; do { c=0; do { d=new int[]{R.nextInt(6)+1,R.nextInt(6)+1,R.nextInt(6)+1}; System.out.println(d[0]+" "+d[1]+" "+d[2]); c++; }while (d[0]==d[1]||d[0]==d[2]||d[1]==d[2]); System.out.println("Count = "+c+"\n"); }while (c==1); }}