diff options
| author | Paulo Custodio <pauloscustodio@gmail.com> | 2021-10-29 10:55:09 +0100 |
|---|---|---|
| committer | Paulo Custodio <pauloscustodio@gmail.com> | 2021-10-29 10:55:09 +0100 |
| commit | 1c83475aade8956c9ef0de26484981e6e93d73fa (patch) | |
| tree | 906eeb28ea7e388d68fac858a3e1e31fa3bef20a /challenge-001 | |
| parent | d6ac72f68709c2bc8717461e37fc3a898aef9261 (diff) | |
| download | perlweeklychallenge-club-1c83475aade8956c9ef0de26484981e6e93d73fa.tar.gz perlweeklychallenge-club-1c83475aade8956c9ef0de26484981e6e93d73fa.tar.bz2 perlweeklychallenge-club-1c83475aade8956c9ef0de26484981e6e93d73fa.zip | |
Add Perl and Pyhton solutions to challenge 122
Diffstat (limited to 'challenge-001')
| -rw-r--r-- | challenge-001/paulo-custodio/brainfuck/ch-2.pl | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/challenge-001/paulo-custodio/brainfuck/ch-2.pl b/challenge-001/paulo-custodio/brainfuck/ch-2.pl index 7ef784110a..65b62fd55a 100644 --- a/challenge-001/paulo-custodio/brainfuck/ch-2.pl +++ b/challenge-001/paulo-custodio/brainfuck/ch-2.pl @@ -14,18 +14,18 @@ use Modern::Perl; my $text = ""; for my $n (1..20) { - if ($n%15==0) { - $text .= "fizzbuzz\n"; - } - elsif ($n%3==0) { - $text .= "fizz\n"; - } - elsif ($n%5==0) { - $text .= "buzz\n"; - } - else { - $text .= "$n\n"; - } + if ($n%15==0) { + $text .= "fizzbuzz\n"; + } + elsif ($n%3==0) { + $text .= "fizz\n"; + } + elsif ($n%5==0) { + $text .= "buzz\n"; + } + else { + $text .= "$n\n"; + } } for (split //, $text) { |
