Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

2. Discuss various aspects of the training design process.

Answered: 1 week ago