Question: Chapter 3 in C + + Write a program that uses a function that returns a number between 1 and 6 . Use this function
Chapter
in C Write a program that uses a function that returns a number between and Use this function to simulate the roll of a die. Allow the user to specify the number of trials and then tabulate that number of rolls of two dice. The program must allow for repeated simulations. Initialize rand using srand and time
Possible Outcomes for any roll
Possible Totals
Therefore, for example, the odds of a are : in any given roll.
If you roll times then the expected outcome for a is So odds are that you will get a times. The odds you will get a are Tabulate the difference between the expected outcome odds and the random number generator outcome list this as error.
In general, you should notice a decrease in error with more trials.
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
