Seven-sided dice from five-sided dice: Difference between revisions

m
→‎{{header|Sidef}}: modified the code to work with the latest version of Sidef
m (→‎{{header|Forth}}: Fix 'works with')
m (→‎{{header|Sidef}}: modified the code to work with the latest version of Sidef)
Line 1,559:
 
var count7 = Hash.new;
count7.default(0);
 
var n = 1e6;
n.times { count7[{dice7()]} := 0 ++ };
count7.keys.sort.each { |k|
printf("%s: %5.2f%%\n", k, 100*(count7[{k]}/n * 7 - 1));
};</lang>
 
{{out}}
2,747

edits