Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi please give me a solution above with C++(Visaul studio 2019) Overview In this homework, you will implement a famous (but simple) game called the
Hi please give me a solution above with C++(Visaul studio 2019)
Overview In this homework, you will implement a famous (but simple) game called the "Monty Hall problem," from the television show Let's Make a Deal The game involves the following situation the game host shows the player three doors, numbered 1 through 3, and tells the player that behind only one of the doors lies a great prize; the other two dou have goats behind them. The player picks one dout, and in response the host opens another door that he/she knows has a goat behind it. The host then asks the player if he/she would like to switch to the other unopened door. After this decision, the player opens their door and claims whatever lies behind it, be it goat or glorious prize. Game Rules 1. A door is chosen in secret (1, 2, or 3) to be the "winning door. Implicitly, the other doors have goats. 2. The user is asked to choose a door (1, 2, or 3). You do not need to verify their choice. 3. Another door is chosen to reveal to the player. The chosen door must have a goat behind it, and must not be the door that the player chose. 4. After revealing the door, the user is asked if they would like to switch to the only remaining other door. Their response will be a 'y' or 'n', inputted as a char variable. 5. Reveal whether the user won the game or not by comparing their final door choice to the secretly chosen winning door. (a) If the user loses, give them a sad message. (b) If the user wins, randomly choose one of five glorious prizes of your design. Randomly pick One of the five prizes and output a description of the prize. Requirements Your lab must follow these code requirements: . I recommend not using string variables, since they don't behave exactly the same as in Java and we haven't covered them yet. If you ignore this advice, at least make sure you #includeStep 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