Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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: (12)
As of 2014-07-31 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls