Factorial: Difference between revisions

Content deleted Content added
m Moved to Arith cat
Ce (talk | contribs)
→‎{{header|Fortran}}: Added Fortran 77 version (probably it works with earlier Fortran versions as well)
Line 172:
A simple one-liner is sufficient
nfactorial = PRODUCT((/(i, i=1,n)/))
 
{{works with|Fortran|77 and later}}
<pre>
INTEGER FUNCTION FACT(N)
INTEGER N, I
FACT = 1
DO 10, I = 1, N
FACT = FACT * I
10 CONTINUE
RETURN
END
</pre>
 
=={{header|Haskell}}==