Multifactorial: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (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 |
set f to 1 |
||
repeat with n from |
repeat with n from n to 2 by -d |
||
set f to f * n |
set f to f * n |
||
end repeat |
end repeat |