Skip to content

Instantly share code, notes, and snippets.

@AndroidKitKat
Created May 17, 2019 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndroidKitKat/c5ce0d0e8d16994e5bcc59e177eee30a to your computer and use it in GitHub Desktop.
Save AndroidKitKat/c5ce0d0e8d16994e5bcc59e177eee30a to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl6
# Author: AndroidKitKat
# Date: 2019-05-17
# create a new array called decks and feed the data in from stdin
my @numbers;
for lines() {
@numbers.push($_)
}
# get the amount from the first number
my $amnt = @numbers.shift;
# get each digit of the number
for @numbers -> $num {
while $num > 0 {
say $num % 10;
$num = $num / 10;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment