=begin
Fizz buzz is a group word game for children to teach them about division.[1] Players take turns to count incrementally, replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz".
=end

def fizz_buzz(nums)
	nums.select do |num|
		if num % 3 == 0 && num % 5 == 0
			puts "fizzbuzz"
		elsif num % 3 == 0
			puts "fizz"
		elsif num % 5 == 0
			puts "buzz"
		else
			puts num
		end
	end
end

puts fizz_buzz() #Enter array to check

