X60: fizzBuzz

Consider the series of numbers beginning at start and running up to but not including end, so for example start=1 and end=5 gives the series 1, 2, 3, 4. Return a new String[] array containing the string form of these numbers, except in the case of multiples of 3, use "Fizz" instead of the number, and for multiples of 5 use "Buzz", and for multiples of both 3 and 5 use "FizzBuzz". In Java, String.valueOf(xxx) will make the String from of an int or other type.

Examples:

fizzBuzz(1, 6) -> {"1", "2", "Fizz", "4", "Buzz"}
fizzBuzz(1, 8) -> {"1", "2", "Fizz", "4", "Buzz", "Fizz", "7"}
fizzBuzz(1, 11) -> {"1", "2", "Fizz", "4", "Buzz", "Fizz", "7", "8", "Fizz", "Buzz"}

Your Answer:

Feedback

Your feedback will appear here when you check your answer.