Created
December 15, 2015 10:56
-
-
Save allyburns/64b3fee418a8018cdd0c to your computer and use it in GitHub Desktop.
My Blonde Code Golf entry for December 2015
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
<pre><?php | |
$n = $_GET['n'] ?: 5; | |
for ($i = 1; $i <= ($c = $n*2)*$n; $i++) | |
echo (($p = $i%$c) == 0) ? "\r\n" : ( $p >= ($max = $c-($min = $n-(ceil($i/$c)))) || $p <= $min ? ' ' : '*'); | |
?></pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment