Answered step by step
Verified Expert Solution
Question
1 Approved Answer
program that simulates the simultaneous rolling of three pairs of six-sided dice (six dice). Run the simulation 10,000 times, 100,000 times, 1,000,000 times, and 10,000,000
program that simulates the simultaneous rolling of three pairs of six-sided dice (six dice). Run the simulation 10,000 times, 100,000 times, 1,000,000 times, and 10,000,000 times. For each run, print the number of times that snake eyes occurs, i.e. all three pairs of dice (six dice total) show a combined minimum value of six (i.e. all the dice show "1"). Print the results in a table like this (your numbers will vary): 10000:0snakeeyes100000:1snakeeyes1000000:15snakeeyes10000000:246snakeeyes The odds of all six dice showing ones are (61)6, or roughly 2 in 100,000 , which is reflected in the table above. While you are free to write the code in any way that satisfies the specification, I strongly encourage you to use this opportunity to familiarize yourself with the C++ standard library, in particular the C++11 random number generation library, as the use of std::rand will lead to biased outcomes. Also, since the specification speaks of pairs of dice, consider to create a Die and a Pair class, and store the 3 pairs of dice in a std: : vector or std: : array
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started