Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Golf: Factorials

by srawls (Friar)
on May 23, 2001 at 04:59 UTC ( [id://82440]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @a = factorial(5); $a[0] = 120<br>
    @a = factorial(5,3,10); $a[0..2] = (120,6,3628800)
    
  2. or download this
    sub f {
    push@a,eval join'*',1..$_ for@_;@a
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://82440]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-19 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found