/program.p6 Secret
Created
May 17, 2019 16:24
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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