Monty Hall problem: Difference between revisions

m
Line 2,042:
=={{header|UNIX Shell}}==
{{works with|bash|2.x| and most bash-compatible unix shells}}
<lang bash>#!/bin/bash
#!/bin/bash
# Simulates the "monty hall" probability paradox and shows results.
# http://en.wikipedia.org/wiki/Monty_Hall_problem
Line 2,114 ⟶ 2,113:
echo "Wins (switch to remaining door): $num_win"
echo "Losses (first guess was correct): $num_lose"
exit 0</lang>
</lang>
Output of a few runs:
<pre>
Anonymous user