Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.38 KB

Fizzbuzz.md

File metadata and controls

31 lines (22 loc) · 1.38 KB

Kata: FizzBuzz

Introduction

Fizz buzz (also known as bizz buzz, or simply buzz) is a group word game for children to teach them about division. Players take turns to count incrementally, replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz".

Fizz buzz has been used as an interview screening device for computer programmers. Creating a list of the first 100 Fizz buzz numbers is a trivial problem for any would-be computer programmer, so interviewers can easily sort out those with insufficient programming ability.

--Wikipedia (Fizz Buzz)

Rules

You will need to modify the Check() function in FizzBuzz project to implement the following rules in order to make the tests pass.

  1. If the value is divisible by (3) three return Fizz
  2. If the value is divisible by (5) five return Buzz
  3. If the value is divisible by both three and five FizzBuzz
  4. All all values should return the original value

Test Cases

  1. FizzBuzz_returns_1_for_input_1()
  2. FizzBuzz_returns_Fizz_for_input_3()
  3. FizzBuzz_returns_Fizz_for_input_6()
  4. FizzBuzz_returns_Buzz_for_input_5()
  5. FizzBuzz_returns_Buzz_for_input_10()
  6. FizzBuzz_returns_FizzBuzz_for_input_15()
  7. FizzBuzz_returns_FizzBuzz_for_input_30()
  8. FizzBuzz_returns_64_for_input_64()

Extra Credit