Created
May 9, 2016 19:59
-
-
Save shtakai/9efed4dfabd81dd8199c705e8bc02480 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pp' | |
def recursive(n) | |
n == 1 ? 1 : n*recursive(n-1) | |
end | |
pp recursive(7) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment