diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2019-07-08 15:26:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-08 15:26:13 +0100 |
| commit | ea3a62e5bb2fe9dbacd3cd0d990fcf1f070ed517 (patch) | |
| tree | 05088339e30b5a6b0218f347c284307890e172d0 | |
| parent | 89dec8844d614d182fe3bb444cad495f3510ed67 (diff) | |
| parent | 8bd960a42cdbdcfe59e8cf4ad92feb5eafacefdd (diff) | |
| download | perlweeklychallenge-club-ea3a62e5bb2fe9dbacd3cd0d990fcf1f070ed517.tar.gz perlweeklychallenge-club-ea3a62e5bb2fe9dbacd3cd0d990fcf1f070ed517.tar.bz2 perlweeklychallenge-club-ea3a62e5bb2fe9dbacd3cd0d990fcf1f070ed517.zip | |
Merge pull request #354 from Scimon/master
Added a verbose option
| -rw-r--r-- | challenge-016/simon-proctor/perl6/ch-1.p6 | 3 |
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 |
