Question: Write a program named roll.java that simulates rolling a pair of dice 10,000 times. It should track how many times each number (total of dice
Write a program named roll.java that simulates rolling a pair of dice 10,000 times. It should track how many times each number (total of dice 2 - 12) is rolled. Total On Dice Number of Rolls 2 274 520 12 281 Hint Create a 13 element int arrary to store the number of rolls of each value 2 12. Create a loop that executes 10,000 times Inside the loop, pick 2 random numbers 1-6. Add the 2 numbers and increment to corresponding array element After the main loop, output the values of array elements 2 - 12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
