Skip to content

J0rgeSerran0/Kata-FizzBuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kata FizzBuzz

Kata or programming game about a FizzBuzz solution

In this code

If a number is divisible by 3, you should return Fizz

If a number is divisible by 5, you should return Buzz

But if a number is divisible by 3 AND 5, you should return FizzBuzz

In this sample code, if the number is not divisible by 3 and/or 5, returns an empty text, but it could return the number too instead of an empty text

Adding complexity (not covered in this sample code)

There are another additional complex rules for this game.

If a number contains 5, you should return Buzz.

If a number contains 7 or is divisible y 7, you should return Fizz

For example, for 35, you should get: Buzz Buzz Fizz

  • 35 is divisible by 5 = Buzz
  • 35 contains 5 = Buzz
  • 35 is divisible by 7 = Fizz