Question: for C++ Let's make a dealgame _ game showcase first choose a door then Monty Hall shows you a door you did not choose. You

 for C++ Let's make a dealgame _ game showcase first choose

for C++

Let's make a dealgame _ game showcase first choose a door then Monty Hall shows you a door you did not choose. You chose 1 and Monty showed door 2(which has a goat) Consider criteria for shown door (pseudocode) X-0; Shown -1; Do x+t: If (x!-chosen) && (x -winning) Shown x; While (x !- shown) Should switch to door 3 or stay with door 1? borrow a function rand() from borrow time from srand(time()) srand(1) rand()- an integer from 0 to 65375 rand number is uniformly distributed - all values are equally likely over time rand()%6+1 standard die 6 unit of probability equally likely add 1 for fun compare how many successes if we stay vs when we switch output is prob of prize from staying vs switching input from user is door chosen computer has to show a non winning door test whether staying is better than switching run it 1000's of time Loop- For loop 1000, 10,000 100,000 trials Let's make a dealgame _ game showcase first choose a door then Monty Hall shows you a door you did not choose. You chose 1 and Monty showed door 2(which has a goat) Consider criteria for shown door (pseudocode) X-0; Shown -1; Do x+t: If (x!-chosen) && (x -winning) Shown x; While (x !- shown) Should switch to door 3 or stay with door 1? borrow a function rand() from borrow time from srand(time()) srand(1) rand()- an integer from 0 to 65375 rand number is uniformly distributed - all values are equally likely over time rand()%6+1 standard die 6 unit of probability equally likely add 1 for fun compare how many successes if we stay vs when we switch output is prob of prize from staying vs switching input from user is door chosen computer has to show a non winning door test whether staying is better than switching run it 1000's of time Loop- For loop 1000, 10,000 100,000 trials

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!