Awesome
fizzbuzz
A collection of fizzbuzz programs in different programming languages. Fizz buzz is a children's game in which players take turns counting. If a number is divisible by three, the player must say "fizz" instead of the number. If a number is divisible by five, the player must say "buzz". And if a number is divisible by both three and five, the player must say "fizz buzz". In addition to being a child's game, fizz buzz is also commonly used as programming challenge in job interviews to determine if the interviewee at least knows the basics of programming.
My goal is for each program to be (in descending order of priority):
1. Correct
2. Safe
3. Readable
4. Idiomatic
I welcome improvements to any of the programs, especially those that help me achieve the above goals. However, I am not inclined to make changes that further a lesser goal at the expense of a higher goal.
Below is a list of languages for which a fizzbuzz program exists in this collection:
- Ada (added October 10, 2016)
- C (added August 25, 2016)
- C++ (added August 25, 2016)
- Chapel (added August 25, 2016)
- Common Lisp (added October 4, 2016)
- Crystal (added August 25, 2016)
- Elixir (added April 24, 2017)
- Erlang (added December 2, 2016)
- Go (added July 19, 2016)
- Haskell (added April 24, 2017)
- Idris (added December 4, 2017)
- Java (added August 25, 2016)
- JavaScript (added July 21, 2016)
- Julia (added August 25, 2016)
- Kotlin (added December 4, 2017)
- Lua (added July 28, 2016)
- Nim (added September 22, 2016)
- OCaml (added January 12, 2017)
- Octave (added November 22, 2016)
- Perl 6 (added November 9, 2016)
- PHP (added August 25, 2016)
- POSIX shell (added July 18, 2016)
- Prolog (added December 19, 2016)
- Python (added July 19, 2016)
- Racket (added November 12, 2016)
- Ruby (added July 21, 2016)
- Rust (added August 25, 2016)
- Scala (added August 25, 2016)
- Scratch (added July 25, 2016)
- Smalltalk (added January 12, 2017)
- Standard ML (added December 27, 2016)