Skip to main content

FizzBuzz

Easy

# FizzBuzz

Read an integer n and print the numbers from 1 to n, one per line. But:

  • For multiples of 3, print Fizz instead of the number.
  • For multiples of 5, print Buzz.
  • For multiples of both 3 and 5, print FizzBuzz.

Example

1234567
Input:  5
Output:
1
2
Fizz
4
Buzz

3 test cases will be run on submit (sample tests shown above are also graded).