Problem Statement: Given a positive integer n, for all numbers between zero and n (inclusive) , output “Fizz” if number is a multiple of three, output “Buzz” if number is multiple of five, output “FizzBuzz” if number is a multiple of 15, otherwise output the number itself.
Solution: Solution is very simple. The only trick is to first test for 15 then for 5 and 3 because 15 is also a multiple of 3 and 5 and therefore all multiples of 15 are also multiple of 3 and/or 5.