Skip to content

Instantly share code, notes, and snippets.

@adeng21
Created April 22, 2014 13:10
Show Gist options
  • Select an option

  • Save adeng21/11178590 to your computer and use it in GitHub Desktop.

Select an option

Save adeng21/11178590 to your computer and use it in GitHub Desktop.
Factorial Recursion
def recursion(number)
if number == 1
number
else
number * recursion(number - 1)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment