Skip to content

Instantly share code, notes, and snippets.

@mehagel
Created May 6, 2013 21:22
Show Gist options
  • Save mehagel/5528310 to your computer and use it in GitHub Desktop.
Save mehagel/5528310 to your computer and use it in GitHub Desktop.
def factorial(n)
if n <= 0
return 1
else
return n * factorial(n-1)
end
end
factorial(56)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment