Skip to content

FizzBuzz implemented in over 25 programming languages

Notifications You must be signed in to change notification settings

zohaib2002/FizzBuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FizzBuzz - In all programming languages

In this repo a common program called FizzBuzz is implemented in over 25 programming languages.

FizzBuzz

The FizzBuzz problem statement is as follows:

For numbers 1 through N, print "Fizz" if the number is divisible by 3, "Buzz" if it's divisible by 5, "FizzBuzz" if it's divisible by both 3 and 5, and the number itself otherwise.

Implementation Details

The logic / working of the program is kept as similar as possible accross all languages to make it easy to compare the implementation in different languages.

The Fizzbuzz program is chosen as it touches all the following aspects of a programming language.

  • I/O: Reading from and Writting to the Standard IO
  • Loops: Looping through the numbers
  • If Else Ladder: To check against different cases
  • Functions: Fizzbuzz is implemented as a seperate function
  • Arithmetic operations and comparisons

Programming Languages

FizzBuzz is implemented in the following languages

C, Clojure, C#, D, Dart, Elixir, F#, Go, Groovy, Haskell, Javascript, Java, Kotlin, Lisp, Lua, OCaml, Pascal, PHP, Perl, Python, R, Ruby, Racket, Rust, Scala, SQL, Swift

Feel free to contribute and add more languages

About

FizzBuzz implemented in over 25 programming languages

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published