Question: For the following simulation first write pseudocode (5pts) and then C++ code (5pts) that does the following: Create a program that estimates the probability of
For the following simulation first write pseudocode (5pts) and then C++ code (5pts) that does the following:
Create a program that estimates the probability of exactly 3 heads in 10 coin flips by repeatedly calling flips(10)(see question 1) and seeing what percentage of the time it returns 3. Design the program so that it prints out results for simulating ten flips 100 times, 1000 times, 10,000 times and 100,000 times. Each time compare the result to the theoretical probability which is
flips(int n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
