Seven-sided dice from five-sided dice: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added/changed comments and whitespace, changed indentations, elided a blank line in the output, added option to specify a seed (for RANDOM) for repeatability, change height of output window.) |
m (→{{header|REXX}}: changed a comment.) |
||
Line 1,450: | Line 1,450: | ||
if trials=='' | trials="," then trials= 1 /*Not specified? Then use the default.*/ |
if trials=='' | trials="," then trials= 1 /*Not specified? Then use the default.*/ |
||
if sample=='' | sample="," then sample=1000000 /* " " " " " " */ |
if sample=='' | sample="," then sample=1000000 /* " " " " " " */ |
||
if datatype(seed,'W') then call random ,,seed /* |
if datatype(seed,'W') then call random ,,seed /*Integer? Then use it as a RAND seed.*/ |
||
/* [↑] one million samples to be used.*/ |
/* [↑] one million samples to be used.*/ |
||
do #=1 for trials; die.=0 /*performs the number of desired trials*/ |
do #=1 for trials; die.=0 /*performs the number of desired trials*/ |