Question: Please answer with C + + Write a program that simulates the rolling of two dice. The program should use rand to roll the first
Please answer with C
Write a program that simulates the rolling of two dice. The program should use rand to roll the first die andmshould use rand again to roll the second die. The sum of the two values should then be calculated. Note: Each die can show an integer value from to so the sum of the two values will vary from to with being the most frequent sum and and being the least frequent sums. Figure shows the possible combinations of the two dice. Your program should roll the two dice times. Use a onedimensional array to tally the numbers of times each possible sum appears. Print the results in a tabular format. Also, determine if the totals are reasonable ie there are six ways to roll a so approximately onesixth of all the rolls should be
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
