FizzBuzz
beginnerUp next
Up next
Output will appear here...
The classic. Read an integer n and print the numbers from 1 to n, one per line, with these replacements:
FizzBuzzFizzBuzzFor an input of 5, a correct solution prints:
1
2
Fizz
4
Buzz
Tip
The order of your checks matters. A number like 15 matches several rules, so test the most specific one first.
No comments yet. Start the discussion.