Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make progress output optional
  • Loading branch information
Paul Cochrane committed Apr 23, 2015
1 parent a461d85 commit 81d99c8
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions categories/euler/prob063-moritz.pl
Expand Up @@ -18,16 +18,18 @@
=end pod

my $count = 0;
for 1..9 -> $x {
for 1..200 -> $y {
if ($x**$y).chars == $y {
say "$x**$y";
$count++;
sub MAIN(Bool :$verbose = False) {
my $count = 0;
for 1..9 -> $x {
for 1..200 -> $y {
if ($x**$y).chars == $y {
say "$x**$y" if $verbose;
$count++;
}
}
}
say $count;
say "missing bigint support: answer should be 49" if $verbose;
}
say $count;
say "missing bigint support: answer should be 49";

# vim: expandtab shiftwidth=4 ft=perl6

0 comments on commit 81d99c8

Please sign in to comment.