Advertisement
libchm

hehe, AM I CANCER B0SS??

Apr 9th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.37 KB | None | 0 0
  1. use feature 'say';
  2. use v5.16;
  3.  
  4. my ($start, $end);
  5.  
  6. print "Input a number to start the loop with: ";
  7. $start = <STDIN>;
  8. $start == 0 ? $start++ : $start ;
  9. print "Input a number to end the loop with: ";
  10. $end = <STDIN>;
  11.  
  12. do{
  13.     say (($start % 3 == 0) ? (($start % 5 == 0) ? "FizzBuzz" : "Fizz" ) : (($start % 5 == 0) ? "Buzz" : $start));
  14.     $start++;
  15. }while $start != $end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement