Multifactorial: Difference between revisions

Added 11l
(Add MAD)
(Added 11l)
Line 18:
 
'''Note:''' The [[wp:Factorial#Multifactorials|wikipedia entry on multifactorials]] gives a different formula. This task uses the [http://mathworld.wolfram.com/Multifactorial.html Wolfram mathworld definition].
 
=={{header|11l}}==
{{trans|Crystal}}
 
<lang 11l>F multifact(n, d)
R product((n .< 1).step(-d))
 
L(d) 1..5
print(‘Degree ’d‘: ’(1..10).map(n -> multifact(n, @d)))</lang>
 
{{out}}
<pre>
Degree 1: [1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800]
Degree 2: [1, 2, 3, 8, 15, 48, 105, 384, 945, 3840]
Degree 3: [1, 2, 3, 4, 10, 18, 28, 80, 162, 280]
Degree 4: [1, 2, 3, 4, 5, 12, 21, 32, 45, 120]
Degree 5: [1, 2, 3, 4, 5, 6, 14, 24, 36, 50]
</pre>
 
=={{header|360 Assembly}}==
1,481

edits