Anonymous user
Monty Hall problem: Difference between revisions
→{{header|Haskell}}: Sample output added
Underscore (talk | contribs) (→{{header|Haskell}}: Added a type signature for "trials" so it works in Hugs.) |
(→{{header|Haskell}}: Sample output added) |
||
Line 201:
percent n = show $ round $
100 * (fromIntegral n) / (fromIntegral trials)</pre>
Sample output:
<pre>
The switch strategy succeeds 67% of the time.
The stay strategy succeeds 34% of the time.
</pre>
=={{header|Java}}==
|