Dice Rolling java program

You should use a while loop: The dice are rolled again and again until the player has won or lost (then, break ends the while loop). while (true) { int dice1=(int)(Math.random()*6+1); int dice2=(int)(Math.random()*6+1); int sum = dice1 + dice2; System.out.println(“Roll: total = ” + sum); if (sum==2 || sum==3 || sum==12) { System.out.println(“Sorry with a ” + … Read more