Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

> Fizz Buzz, any languages

views
     
seraphiel
post May 18 2007, 09:55 AM

New Member
*
Junior Member
31 posts

Joined: Jul 2006
From: Petaling Jaya, Malaysia


Well, since you specifically said interesting here's mine:

CODE
<?foreach(range(1,100)as$i)echo$i%15?$i%5?$i%3?$i:"Fizz":"Buzz":"FizzBuzz","\n";?>


I actually posted about it here (and included a couple of solutions my colleagues came up with) whistling.gif

This post has been edited by seraphiel: May 18 2007, 10:54 AM
seraphiel
post May 18 2007, 09:33 PM

New Member
*
Junior Member
31 posts

Joined: Jul 2006
From: Petaling Jaya, Malaysia


I've been coding with error_reporting(E_ALL) too long to even attempt that, zybler tongue.gif

I would say that your solution is definitely not what I'd accept as the shortest simply because it throws a warning whistling.gif
seraphiel
post May 18 2007, 10:50 PM

New Member
*
Junior Member
31 posts

Joined: Jul 2006
From: Petaling Jaya, Malaysia


Well done tongue.gif

 

Switch to:
| Lo-Fi Version
0.0198sec    0.23    6 queries    GZIP Disabled
Time is now: 5th April 2020 - 04:41 AM