Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Golf Challenge: FizzBuzz

by Sidhekin (Priest)
on Mar 02, 2007 at 17:06 UTC ( #602905=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -le'print(($_%3?"":Fizz).($_%5?"":Buzz)or$_)for 1..100'
    
  2. or download this
    sub fizzBuzz {
    #23456789 123456789 123456789 123456789 123456789 
    print(($_%3?"":Fizz).($_%5?"":Buzz)or$_)for 1..100
    }
    
  3. or download this
    sub fizzBuzz {
    #23456789 123456789 123456789 123456789 123456789 12
    print+($_%3?"":Fizz).($_%5?"":Buzz)||$_,$/for 1..100
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602905]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-02-22 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (338 votes). Check out past polls.