Created
September 3, 2012 00:07
-
-
Save jakeboxer/3605769 to your computer and use it in GitHub Desktop.
FizzBuzz Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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”. | |
So, for example, if you were to print from 1 to 20, it would look like this: | |
1 | |
2 | |
Fizz | |
4 | |
Buzz | |
Fizz | |
7 | |
8 | |
Fizz | |
Buzz | |
11 | |
Fizz | |
13 | |
14 | |
FizzBuzz | |
16 | |
17 | |
Fizz | |
19 | |
Buzz |
naveedehmad
commented
Sep 3, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment