Template:Factorial

From MidsouthMakers - Memphis Area Hackerpace
Revision as of 17:53, 18 January 2010 by Admin (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
[edit] [purge] Template documentation

This template finds the factorial of a number. To use it, enter:
{{factorial|input}}
The input must be a positive integer smaller than 100 (better than most calculators, which go up to only 69). This template works by repeating conditional multiplications. Examples:

  • {{factorial|2}} gives 2
  • {{factorial|3}} gives 6
  • {{factorial|5}} gives 120
  • {{factorial|10}} gives 3628800
  • {{factorial|80}} gives 2.6313083693369E+35
  • {{factorial|0.5}} gives 1 (invalid input)
  • {{factorial|-1}} gives (invalid input)

ka:თარგი:ფაქტორიალი