aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-016/simon-proctor/perl6/ch-1.p63
1 files changed, 2 insertions, 1 deletions
diff --git a/challenge-016/simon-proctor/perl6/ch-1.p6 b/challenge-016/simon-proctor/perl6/ch-1.p6
index eff2f108e4..56ef06d167 100644
--- a/challenge-016/simon-proctor/perl6/ch-1.p6
+++ b/challenge-016/simon-proctor/perl6/ch-1.p6
@@ -1,7 +1,7 @@
use v6;
#| Calculate the largest slace of Pie from Pythagoras Pie Puzzle
-sub MAIN() {
+sub MAIN( Bool :v($verbose) = False ) {
my $cake = FatRat.new(1);
my $slice = 0;
my $person = 0;
@@ -12,6 +12,7 @@ sub MAIN() {
$slice = $nslice;
$person = $size;
}
+ say "Person $size gets {$nslice*100}%" if $verbose;
}
say "Person $person gets {$slice*100}% of the cake or {$slice.nude().join("/")}";
} \ No newline at end of file