Monty Hall problem: Difference between revisions
m
→{{header|Sidef}}: modified the code to work with the latest version of Sidef
(→{{header|Perl 6}}: modernize) |
m (→{{header|Sidef}}: modified the code to work with the latest version of Sidef) |
||
Line 3,330:
var show;
do {
} while (show ~~ [chosen, prize]);
given(chosen) {
when (prize) { stayWins += 1 }
when ([3 - show - prize])
default { die "~ error ~" }
}
}
Line 3,343 ⟶ 3,345:
{{out}}
<pre>
Staying wins
Switching wins
</pre>
|