FizzBuzz in multiple languages
Shell C# Objective-C Fortran Java Ada Other
Switch branches/tags
Nothing to show
Pull request Compare This branch is 8 commits ahead, 314 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.Enumerable.cs
fizzbuzz.adb
fizzbuzz.bas
fizzbuzz.bash
fizzbuzz.c
fizzbuzz.cpp
fizzbuzz.cs
fizzbuzz.csh
fizzbuzz.d
fizzbuzz.f
fizzbuzz.go
fizzbuzz.guile
fizzbuzz.java
fizzbuzz.js
fizzbuzz.linq1.cs
fizzbuzz.linq2.cs
fizzbuzz.lua
fizzbuzz.m
fizzbuzz.pas
fizzbuzz.php
fizzbuzz.pl
fizzbuzz.pl6
fizzbuzz.py
fizzbuzz.rb
fizzbuzz.scala
fizzbuzz.sh
fizzbuzz.tcl
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 (27 at last count) C solutions.

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

  • Ada
  • BASIC (bwBASIC)
  • Bash
  • C
  • C++
  • C#
  • C-shell
  • D
  • Fortran
  • Go
  • Guile
  • Java
  • JavaScript
  • Lua
  • Objective-C
  • Pascal
  • PHP
  • Perl 5
  • Perl 6
  • Python
  • Ruby
  • Scala
  • sh (Bourne shell)
  • Tcl

The verify script executes each program and confirms that its output is correct. It works on my system, Ubuntu 12.04 with a certain set of packages installed.

Do not take this too seriously.