Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FizzBuzz
- def fizz(num)
- return "FizzBuzz" if num % 15 == 0
- return "Fizz" if num % 3 == 0
- return "Buzz" if num % 5 == 0
- return num.to_s
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement