Created
August 30, 2011 14:07
-
-
Save GodsBoss/1180970 to your computer and use it in GitHub Desktop.
A PHP FizzBuzz variant.
This file contains hidden or 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
<?php | |
// For the original version, see | |
// http://forum.golem.de/read.php?54793,2785037,2785926#msg-2785926 | |
$a = array(0, | |
'fizz', | |
'buzz', | |
'fizzbuzz' ) ; | |
for( $i=1; $i<101; $i++ ) { | |
$a['00'] = $i ; | |
print( $a[!($i%5)+2*!($i%3)] . "\n") ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment