Skip to content

Monty Hall problem, a C++ experiment. Proves it's better to change door.

Notifications You must be signed in to change notification settings

morfah/Monty-Hall-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monty Hall Problem

Monty Hall problem, a C++ experiment.

Proves it's better to change door.

Information

Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?

More information about the problem

Build and run

Windows (MSVC)

  1. Install Visual Studio Community 2022. Or use Professional/Enterprise version if you have it.
  2. In the installer check Desktop development with C++.
  3. Start Developer Command Prompt for VS 2022 or Developer Powershell for VS 2022.
  4. Inside that terminal you access compiler tools and can run .\compile.bat inside the build folder.
  5. Run .\main.exe.

Mac OS (Xcode tools)

  1. Open the terminal.
  2. Install Xcode command-line tools. xcode-select --install
  3. Run make inside build folder.
  4. Run .\main.

About

Monty Hall problem, a C++ experiment. Proves it's better to change door.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published