RosettaCodeData/Task/Factorial/00DESCRIPTION

18 lines
649 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
;Definitions:
2017-09-23 10:01:46 +02:00
:*   The factorial of   '''0'''   (zero)   is [[wp:Factorial#Definition|defined]] as being   1   (unity).
2016-12-05 22:15:40 +01:00
:* &nbsp; The &nbsp; '''Factorial Function''' &nbsp; of a positive integer, &nbsp; <big> ''n'', </big> &nbsp; is defined as the product of the sequence:
<big><big> ''n'', &nbsp; ''n''-1, &nbsp; ''n''-2, &nbsp; ... &nbsp; 1 </big></big>
2013-04-10 21:29:02 -07:00
2016-12-05 22:15:40 +01:00
;Task:
2015-02-20 00:35:01 -05:00
Write a function to return the factorial of a number.
2016-12-05 22:15:40 +01:00
2015-02-20 00:35:01 -05:00
Solutions can be iterative or recursive.
2016-12-05 22:15:40 +01:00
Support for trapping negative &nbsp; <big> ''n'' </big> &nbsp; errors is optional.
2018-06-22 20:57:24 +00:00
;Related task:
* &nbsp; [[Primorial numbers]]
2016-12-05 22:15:40 +01:00
<br><br>