FizzBuzz

Read a whole number n and print the numbers from 1 to n, one per line, but:

  • print FizzBuzz instead of numbers that divide by both 3 and 5
  • print Fizz instead of numbers that divide by 3
  • print Buzz instead of numbers that divide by 5

For the input 5:

1
2
Fizz
4
Buzz

Watch the order of your conditions: 15 divides by 3, by 5, and by both.

Tests
Results will be shown here
C++
Console
Press Run to start your program.