1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00
programming-challenges/challenges/fizzbuzz
2023-08-10 11:13:06 +02:00
..
solutions fix(solutions): memory issues thanks to -fsanitize=address flag with gcc 2023-08-10 11:13:06 +02:00
test feat(challenges): add fizzbuzz 2021-06-30 13:35:03 +02:00
README.md fix: update author - Théo LUDWIG 2023-07-02 17:28:54 +02:00

fizzbuzz

Created by @theoludwig on 30 June 2021.

Instructions

Write a program that print the numbers from 1 to n but:

  • if number is divisible by 3, print Fizz
  • if number is divisible by 5, print Buzz
  • if number is divisible by both 3 and 5, print FizzBuzz
  • otherwise print the number

Examples

Example 1

Input

5

Output

1
2
Fizz
4
Buzz

See the test folder for examples of input/output.