Question: Write a script to simulate the rolling of two dice. The script should use Math.random to roll the first die and again to roll the
Write a script to simulate the rolling of two dice. The script should use Math.random to roll the first die and again to roll the second die. The two die make an ordered pair with the first die representing the row number and the second die representing the column number. Since each die can show an integer value from 1 to 6, the resulting table should have row values from 1 to 6 and the column values from 1 to 6. There are 36 possible combinations. Your program should prompt the user for the number of times to roll the dice, but should be a minimum of 10,000 times. Use a two dimensional array to tally the number of times each combination appears. Display the results in an HTML5 table. (Die_Combination)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
