Combinations and permutations: Difference between revisions

Content added Content deleted
m (→‎{{header|Sidef}}: Fix link: Perl 6 --> Raku)
m (→‎{{header|Raku}}: explicit .gist call to trigger role 'Logarithm')
Line 1,861: Line 1,861:
for 5, 50, 500, 1000, 5000, 15000 -> $n {
for 5, 50, 500, 1000, 5000, 15000 -> $n {
my $p = $n div 3;
my $p = $n div 3;
say "P($n, $p) = ", P($n, $p, :float);
say "P($n, $p) = ", P($n, $p, :float).gist;
}
}
for 100, 200 ... 1000 -> $n {
for 100, 200 ... 1000 -> $n {
my $p = $n div 3;
my $p = $n div 3;
say "C($n, $p) = ", C($n, $p, :float);
say "C($n, $p) = ", C($n, $p, :float).gist;
}</lang>
}</lang>
{{out}}
{{out}}