aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <Mohammad.Anwar@yahoo.com>2023-12-11 03:14:02 +0000
committerGitHub <noreply@github.com>2023-12-11 03:14:02 +0000
commitc5f77edc3993a8d666385b62bfe77a61fcdd07b6 (patch)
tree903f945705b2c9899a7ff2d19243cb3d7eb0090d
parent5cfdb554ce05d3985819b37d9180780e7cc50d75 (diff)
parent91a7b2ba4766cfde7a8b13eda80b4daff7317202 (diff)
downloadperlweeklychallenge-club-c5f77edc3993a8d666385b62bfe77a61fcdd07b6.tar.gz
perlweeklychallenge-club-c5f77edc3993a8d666385b62bfe77a61fcdd07b6.tar.bz2
perlweeklychallenge-club-c5f77edc3993a8d666385b62bfe77a61fcdd07b6.zip
Merge pull request #9223 from 0rir/246
246
-rw-r--r--challenge-246/0rir/raku/ch-1.raku27
-rwxr-xr-xchallenge-246/0rir/raku/recur.raku14
2 files changed, 41 insertions, 0 deletions
diff --git a/challenge-246/0rir/raku/ch-1.raku b/challenge-246/0rir/raku/ch-1.raku
new file mode 100644
index 0000000000..b200e393bd
--- /dev/null
+++ b/challenge-246/0rir/raku/ch-1.raku
@@ -0,0 +1,27 @@
+#!/usr/bin/env raku
+# :vim ft=raku sw=4 expandtab # πŸ¦‹ βˆ…βˆͺβˆ©βˆ‹βˆˆβˆ‰ ≑ β‰’ «␀ Β» ∴
+use v6;
+use Test;
+
+=begin comment
+
+246-1: 6 out of 49
+Submitted by: Andreas Voegele
+6 out of 49 is a German lottery.
+
+Write a script that outputs six unique random integers from the range 1 to 49.
+
+Output
+3
+10
+11
+22
+38
+49
+=end comment
+
+my @l = 1 … 6;
+say "Output:";
+.say for (1…49).pick( 6);
+exit;
+
diff --git a/challenge-246/0rir/raku/recur.raku b/challenge-246/0rir/raku/recur.raku
new file mode 100755
index 0000000000..1f0506679c
--- /dev/null
+++ b/challenge-246/0rir/raku/recur.raku
@@ -0,0 +1,14 @@
+#!/usr/bin/env raku
+# :vim ft=raku sw=4 expandtab # πŸ¦‹ βˆ…βˆͺβˆ©βˆ‹βˆˆβˆ‰ ≑ β‰’ «␀ Β» ∴
+use v6;
+
+sub MAIN( *@in ) {
+ my ($p, $q, @a) = @inΒ».Int;
+
+ for ^3 {
+ @a.push: $p Γ— @a[*-2] + $q Γ— @a[*-1];
+ }
+
+ say "P $p Q $q Ary: @a.raku()";
+}
+