A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Fizz Buzz page! Here, you'll find a description of the project as well as a list of sample programs written in various languages.
This article was written by:
Fizz Buzz is a typical interview question which tests the developers knowledge of flow control and operators. The goal of the problem is to output the numbers 1 through 100 but with special cases for various intervals–traditionally 3 (Fizz) and 5 (Buzz).
For the purposes of this repository, the following rules apply:
Write a program that prints the numbers 1 to 100. However, for multiples of three, print "Fizz" instead of the number. Meanwhile, for multiples of five, print "Buzz" instead of the number. For numbers which are multiples of both three and five, print "FizzBuzz"
To be even more specific, please output each value on its own line. The first 15 lines of output should look something like:
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
The program should then be saved in a file called fizz buzz using the proper naming conventions of your choice language.
Verify that the actual output matches the expected output (see Requirements).
There are 53 articles: