back
1 comments
No, in that case the first two conditionals will both pass and the result will end up as "FizzBuzz".
Well, that would depend on the print statement. Generally, all of them have new lines. Even if they don't you would have to generate new lines appropriately otherwise the next number would print right next to Fizz.

PS : My assumption is that you need to print each number or Fizz or Buzz or FizzBuzz in a separate line.

Well, you can check for 3 AND 5 first (or check for 15 altogether). This is if you have two subsequent checks for 3 and for 5.