Retired

Recursion #1 - Factorial (retired)

6,007 of 8,336gabrielsiedler

Description:

Do you know recursion?
This is a kata series that you can only solve using recursion.

##1 - Factorial

In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example,

5! = 5 * 4 * 3 * 2 * 1 = 120.

The value of 0! is 1.

#Your task

You have to create the function factorial that receives n and returns n!. You have to use recursion.

Fundamentals
Recursion
Mathematics

More By Author:

Check out these other kata created by gabrielsiedler

Stats:

CreatedJan 12, 2016
Warriors Trained22946
Total Skips2813
Total Code Submissions28291
Total Times Completed8336
JavaScript Completions6007
C# Completions1183
TypeScript Completions436
SQL Completions899
CoffeeScript Completions24
Total Stars190
% of votes with a positive feedback rating88% of 1248
Total "Very Satisfied" Votes1007
Total "Somewhat Satisfied" Votes189
Total "Not Satisfied" Votes52
Ad
Contributors
  • gabrielsiedler Avatar
  • Javatlacati Avatar
  • brunolm Avatar
  • smile67 Avatar
  • user5036852 Avatar
  • Blind4Basics Avatar
  • hobovsky Avatar
  • user8436785 Avatar
Ad