-
Write a “fizzBuzz” method that accepts a number as input and returns it as a String.
-
For multiples of three return “Fizz” instead of the number
-
For the multiples of five return “Buzz”
-
For numbers that are multiples of both three and five return “FizzBuzz”.
Test cases:
- On input as 3, it should return Fizz
- On input as 5, it should return Buzz
- On invalid input, should throw exception
- On 9, it should return Fizz
- On 25, it should return Buzz
- On 15, it should return FizzBuzz