FizzBuzz in multiple languages
Shell COBOL Fortran Visual Basic Objective-C C# Other
Switch branches/tags
Nothing to show
Pull request Compare This branch is 219 commits behind Keith-S-Thompson:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
expected-output.txt
fizzbuzz.a68
fizzbuzz.adb
fizzbuzz.awk
fizzbuzz.b
fizzbuzz.bas
fizzbuzz.bash
fizzbuzz.bc
fizzbuzz.c
fizzbuzz.cat
fizzbuzz.clojure
fizzbuzz.cob
fizzbuzz.cpp
fizzbuzz.cs
fizzbuzz.csh
fizzbuzz.curl
fizzbuzz.d
fizzbuzz.erl
fizzbuzz.f
fizzbuzz.f90
fizzbuzz.fal
fizzbuzz.fizzbuzz
fizzbuzz.go
fizzbuzz.gpt
fizzbuzz.groovy
fizzbuzz.guile
fizzbuzz.hs
fizzbuzz.java
fizzbuzz.js
fizzbuzz.lua
fizzbuzz.m
fizzbuzz.m4
fizzbuzz.mk
fizzbuzz.mod
fizzbuzz.nodejs
fizzbuzz.octave
fizzbuzz.pas
fizzbuzz.php
fizzbuzz.pl
fizzbuzz.pl6
fizzbuzz.py
fizzbuzz.py3
fizzbuzz.ratfor
fizzbuzz.rb
fizzbuzz.rexx
fizzbuzz.rs
fizzbuzz.scala
fizzbuzz.sh
fizzbuzz.sx
fizzbuzz.tail
fizzbuzz.tcl
fizzbuzz.vb
verify

README.md

FizzBuzz is a nearly trivial programming exercise, sometimes used in job interviews to weed out candidates who say they can program but really can't.

References:

The requirements are simple:

Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".

In my fizzbuz-c project I present multiple (37 at last count) C solutions.

Here I present multiple implementations, one in each language. The current set of languages (51 of them) is:

Many of these are inspired by http://99-bottles-of-beer.net/.

tail and cat are simply the standard Unix/Linux utilities, not real scripting languages. The cat implementation in particular is an ugly cheat, depending on the existence of the expected-output.txt file.

curl is a URL transfer utility, not a programming language. fizzbuzz.curl, like fizzbuzz.cat, depends on the existence of expected-output.txt, but on this GitHub project page rather than in the current directory; it also requires an Internet connection.

The verify script executes each program and confirms that its output is correct. It works on my systems, x86 Ubuntu 12.10 and x86_64 Linux Mint 14, with required packages installed as documented in each source file. (Linux Mint is derived from Ubuntu).

I intend to set up a fresh installation of Ubuntu 12.10 x86_64 system on a virtual machine to confirm that all tests will pass when the specified packages are installed. I'll write and publish a script to automate the entire process.

I don't have a B compiler. Instead, I use sed to translate fizzbuzz.b to equivalent C code, which I then compile and execute. I can't guarantee that the translation (which is extremely ad-hoc) is correct.

Do not take this too seriously.