Help for this page

Select Code to Download


  1. or download this
    my $p = 7;  # Number of pigeon holes.
    my $c = 12; # Number of cards
    ...
        for my $s2 ( $s1..$p ) {
            for my $s3 ( $s2..$p ) {
                ... Need $c-$p loops
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
        $p[$_-1]++ for @s;
        print "@p\n";
    }