Question: Write a program that simulates the rolling of two dice. The program should use rand to roll the first dice (returning a value between 1
Write a program that simulates the rolling of two dice. The program should use rand to roll the first dice (returning a value between 1 and 6) and should use rand again to roll the second dice. The sum of the two values should then be calculated. Your program should roll the two dice 36,000 times. Use a 6*6 two-dimensional array called combinations to tally how many times each dice 1 value/dice 2 value combinations to tally how many of 12 integer elements called sums to tally the numbers of times each poosible sum appears. Create a function called printResults that receives the array, the vector, and any other necessary parameters to print the values of the array in tabular form and the values of the vector in tabular form.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
