Anonymous user
Mind boggling card trick: Difference between revisions
m
→{{header|REXX}}: reduced the number of random shuffles.
(→{{header|REXX}}: added a pluralizer and a commatizer to the program, also added more information to the "results" output sentence, allowed the specification of the number of shuffles, created a (new) deck of cards as if they came from a new box.) |
m (→{{header|REXX}}: reduced the number of random shuffles.) |
||
Line 681:
if trials=='' | trials=="," then trials= 1000 /*Not specified? Then use the default.*/
if #=='' | #=="," then #= 52 /* " " " " " " */
if shuffs=='' | shuffs=="," then shuffs= #%
if datatype(seed, 'W') then call random ,,seed /*if integer, use this as a RANDOM seed*/
ok=0 /*the number of "expected" good trials.*/
Line 727:
{{out|output|text= when using the default inputs:}}
<pre>
Correctness of the mathematician's assertion: 100% (out of 10,000 trials) using a deck of 52 cards, and doing
</pre>
|