Monty Hall problem: Difference between revisions
Content added Content deleted
m (→{{header|J}}) |
m (→version 2: added/changed whitespace and comments to the program and the output.) |
||
Line 3,070:
===version 2===
<lang rexx>/*REXX program simulates a
parse arg t .; if t=='' then t=1000000 /*Not specified? Then use
wins.=0 /*wins.0
/*door values:
do t;
say 'switching wins '
say ' staying wins '
say 'performed ' t " times."
'''output''' when using the default number of trials (one million):
<pre>
Line 3,089 ⟶ 3,088:
staying wins 33.3% of the time.
performed 1000000 times.
</pre>
|