FizzBuzz for (almost) Every Language

FizzBuzz. Chances are that you’ll need to know it at one time or another if you apply for any programming or development job. Here are a couple ways to do FizzBuzz in a variety of languages. There are alternate ways to do this in each language but these are a few examples of some code that you could use. I”ll update this post over time as I find new examples.

The example below is a function which would allow you to specify your own minimum and maximum value for the code to evaluate. You could convert it to the standard fizzbuzz (which usually evaluates 1-100) by just including the code from the for statement down and replacing low and high with 1 and 101 respectively to evaluate 1-100.

C# 2

C 1

C++ 1

Java 1

Perl 1

Javascript (execute in Firebug debugger) 1


Ruby 1

2. Original code was done by a guest on Pastebin – Link
FizzBuzz – Rosetta Code