Answer to Question #32369 in C++ for amal
The Monty Hall Game is named after a host of a television game show from the 70's in which a contestant could win a new car by guessing the right door that the car was behind. It became a popular puzzle because the best playing strategy in counterintuitive. Here is how the game works:
• The contestant chooses one door.
• Then Monty opens one of the other doors that does NOT have the car behind it.
• At this point in the game, the contestant has the option of changing his or her choice to the third door.
1. In this game you will need to generate a random number representing the door that has the car behind it. Your program must be able to generate a random integer between 1 and 3. To do this, you will need to perform the three steps below:
Step 1: You must include the following two header files at the beginning of the program in your library/header file directives.
Step 2: The seed and srand must be initialized at the beginning of your main program as follows:
Step 3: Use the following expression when you need to generate a random number from 1 to 3:
(rand() % 3) + 1;
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!