Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Golf: Factorials

by Discipulus (Abbot)
on Dec 15, 2015 at 10:52 UTC ( #1150356=note: print w/replies, xml ) Need Help??


in reply to Re^3: Golf: Factorials
in thread Golf: Factorials

also this solution works only for series of consecutive integers starting with 1
perl -E "$a=1;say$a*=++$}for @ARGV" 0 1 2 3 1 2 6 24 perl -E "$a=1;say$a*=++$}for @ARGV" 1 3 1 2


L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2019-10-13 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?