aboutsummaryrefslogtreecommitdiff
path: root/challenge-030/e-choroba/perl5/ch-2.pl
blob: 5a11614dd5646bc538a4f2272d2050aac6ebc945 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };

for my $i (1 .. 10) {
    for my $j ($i .. 10) {
        last if $i + $j > 11;

        for my $k ($j .. 10) {
            last if $i + $j + $k > 12;

            say "$i, $j, $k"
                if $i + $j + $k == 12
#                && 0 == $i * $j * $k % 2
        }
    }
}