Created
December 8, 2017 02:47
-
-
Save ryu1-1uyr/1dbcae94fd517645d47a8139da20b827 to your computer and use it in GitHub Desktop.
selection =>perl FizzBuzz
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
#!/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