Objective
FizzBuzz is a classic for practicing conditions: depending on the divisors of the number, one word or another is shown. The order of the conditions matters.
Instructions
- Read a positive integer.
- If it is divisible by both 3 and 5 show
FizzBuzz; if only by 3,Fizz; if only by 5,Buzz; in any other case show the number itself.
9
Fizz
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise