Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Golf Challenge: FizzBuzz

by liverpole (Monsignor)
on Mar 02, 2007 at 21:13 UTC ( #602965=note: print w/ replies, xml ) Need Help??


in reply to Golf Challenge: FizzBuzz

Here's another cute way to do it, based on a version in C, which was linked to from the comments in the original article:

print+($_,Fizz,Buzz,FizzBuzz)[3&19142723>>2*$_%30]for 1..100

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/


Comment on Re: Golf Challenge: FizzBuzz
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602965]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2015-04-01 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (677 votes), past polls