A simple Fortran program to demonstrate the correct solution to the Monty Hall problem. After compilation, a number of run cycles must be specified, after which the program prints the result of either strategy (keep/change) to the files keep.dat and change.dat and to standard output. For a suitably large number of cycles, the expected result (change succeeds 2/3 of the time) is obtained.
archon88 / montyhall Goto Github PK
View Code? Open in Web Editor NEWDemonstration of solution to Monty Hall problem
License: GNU General Public License v3.0