Retired

Factorial Factory (retired)

5,008 of 8,672galafik

Description:

In mathematics, the factorial of integer 'n' is written as 'n!'. It is equal to the product of n and every integer preceding it. For example: 5! = 1 x 2 x 3 x 4 x 5 = 120

Your mission is simple: write a function that takes an integer 'n' and returns 'n!'.

You are guaranteed an integer argument. For any values outside the positive range, return null, nil or None .

Note: 0! is always equal to 1. Negative values should return null;

For more on Factorials : http://en.wikipedia.org/wiki/Factorial

Recursion
Mathematics
Algorithms

Stats:

CreatedNov 21, 2013
Warriors Trained11093
Total Skips544
Total Code Submissions31994
Total Times Completed8672
JavaScript Completions5008
CoffeeScript Completions159
Python Completions2744
Ruby Completions926
C# Completions230
Total Stars82
% of votes with a positive feedback rating88% of 742
Total "Very Satisfied" Votes584
Total "Somewhat Satisfied" Votes137
Total "Not Satisfied" Votes21
Ad
Contributors
  • galafik Avatar
  • jhoffner Avatar
  • user578387 Avatar
  • DeirhX Avatar
  • Blind4Basics Avatar
  • Voile Avatar
  • Souzooka Avatar
Ad