Factorial: Difference between revisions

147 bytes added ,  11 months ago
no edit summary
No edit summary
Line 10,685:
int N; \range: 0..12
return if N<2 then 1 else N*FactRecur(N-1);</syntaxhighlight>
 
=={{header|YAMLScript}}==
<syntaxhighlight lang="yaml">
factorial(x):
apply:
- \*
- range(2, inc(x))
 
prn: factorial(10)
</syntaxhighlight>
 
=={{header|Zig}}==
55

edits