Skip to content

Instantly share code, notes, and snippets.

@ryu1-1uyr
Created December 8, 2017 02:47
Show Gist options
  • Save ryu1-1uyr/1dbcae94fd517645d47a8139da20b827 to your computer and use it in GitHub Desktop.
Save ryu1-1uyr/1dbcae94fd517645d47a8139da20b827 to your computer and use it in GitHub Desktop.
selection =>perl FizzBuzz
#!/use/bin/perl
use warnings;
use strict;
use 5.010;
my $i = 0;
while($i <= 100) {
if ($i % 15 == 0){
say"FizzBuzz";
}elsif($i % 5 == 0){
say"Buzz";
}elsif($i % 3 == 0){
say"Fizz";
}else{
say"$i";
}
$i++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment