Monty Hall problem: Difference between revisions

Line 778:
integer winner, choice, shown
 
for plays = 01 to 10000 do
winner = rand(3)
choice = rand(3)
Line 792:
printf(1, "Switching wins %d times\n", switchWins)
printf(1, "Staying wins %d times\n", stayWins)</lang>
 
 
 
----
== Output ==
Switching wins 6697 times
 
Staying wins 3303 times
 
=={{header|F_Sharp|F#}}==
Anonymous user