05-15-2009, 12:27 PM
|
#20 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Just passed a little time during lunch.
PHP Code:
<?php
function a($n){$a=$n%100or$a='no more';return
sprintf("%s bottle%s of beer",$a,(--$n)?'s':'');}
for ($w=' on the wall',$n=100;1+$s=a($n);)
echo ucfirst($s),$w,', ',$s,".\n",$n?
'Take one down and pass it around, '
:'Go to the store and buy some more, ',
a($n--?$n:99),$w,'.',"\n\n";
|
|
|
|