Birthday problem: Difference between revisions

Content added Content deleted
m (Automated syntax highlighting fixup (second round - minor fixes))
m (→‎{{header|Wren}}: Minor tidy)
Line 2,074: Line 2,074:
{{trans|Kotlin}}
{{trans|Kotlin}}
{{libheader|Wren-fmt}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="ecmascript">import "random" for Random
<syntaxhighlight lang="wren">import "random" for Random
import "/fmt" for Fmt
import "./fmt" for Fmt


var equalBirthdays = Fn.new { |nSharers, groupSize, nRepetitions|
var equalBirthdays = Fn.new { |nSharers, groupSize, nRepetitions|
Line 2,126: Line 2,126:
5 independent people in a group of 314 share a common birthday 50.7%
5 independent people in a group of 314 share a common birthday 50.7%
</pre>
</pre>

=={{header|XPL0}}==
=={{header|XPL0}}==
<syntaxhighlight lang="xpl0">func Sim(N);
<syntaxhighlight lang="xpl0">func Sim(N);