Question: import java.util.Random; // Needed for the Random class This class simulates rolling a pair of dice 10,000 tmes and counts the number of times doubles

 import java.util.Random; // Needed for the Random class This class simulates

import java.util.Random; // Needed for the Random class This class simulates rolling a pair of dice 10,000 tmes and counts the number of times doubles of are rolled for each different pair of doubles- public class Dicesimulation public static void main(Stringt) args) final int NUMBER -10000; // Number of dice rolls // A random number generator used in // simulating the rolling of dice Random generator = new Random(); int die1Value; int die2Value; int count 0; // Value of the first die // Value of the second die // Total number of dice rolls int snakeEyes =; // Number of snake eyes rolls int twos ; int three s = ; int fourso int fives int sixes = 0; // Number of double two rolls // Number of double three rolls // Number of double four rolls // Number of double five rolls // Number of double six rolls // TASK #1 Enter your code for the algorithm here // Display the results System.out.prntin (You rolled snake eyes "+ snakeEyes + out of "+ count + rolls.) twos + out ofcount + System.out println C"You rolled double twos+ " rolls. threes +out of " + count + fours + out ofcount + fives + "out of "+ count + System.out.printin ("You rolled double threes "+ " rolls.") System.out.println ("You rolled double fours "+ " rolls.): System.out.printin ("You rolled double fives " " rolls.): System.out.println ("You rolled double sixes"+ sixes + " out of+ count + rolls.")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!