diff options
| -rw-r--r-- | challenge-042/simon-proctor/raku/ch-1.p6 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-042/simon-proctor/raku/ch-1.p6 b/challenge-042/simon-proctor/raku/ch-1.p6 new file mode 100644 index 0000000000..d7d175ae80 --- /dev/null +++ b/challenge-042/simon-proctor/raku/ch-1.p6 @@ -0,0 +1,13 @@ +#!/usr/bin/env perl6 + +use v6; + +#| Print the decimal to octal from start to end +sub MAIN ( + Int() :$start-val = 0, #= Start value (default 0) + Int() :$end-val = 50, #= End value (default 50) +) { + for $start-val..$end-val -> \val { + say "Decimal {val} = Octal {val.base(8)}"; + } +} |
