Multifactorial: Difference between revisions

Content added Content deleted
(Add Cowgol)
m (→‎{{header|AppleScript}}: Modified to observe the !0 = 1 convention.)
Line 286: Line 286:
=={{header|AppleScript}}==
=={{header|AppleScript}}==
<syntaxhighlight lang="applescript">on multifactorial(n, d)
<syntaxhighlight lang="applescript">on multifactorial(n, d)
set f to n
set f to 1
repeat with n from (n - d) to 2 by -d
repeat with n from n to 2 by -d
set f to f * n
set f to f * n
end repeat
end repeat