Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use feature 'say';
- use v5.16;
- my ($start, $end);
- print "Input a number to start the loop with: ";
- $start = <STDIN>;
- $start == 0 ? $start++ : $start ;
- print "Input a number to end the loop with: ";
- $end = <STDIN>;
- do{
- say (($start % 3 == 0) ? (($start % 5 == 0) ? "FizzBuzz" : "Fizz" ) : (($start % 5 == 0) ? "Buzz" : $start));
- $start++;
- }while $start != $end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement