Skip to content

Instantly share code, notes, and snippets.

@karapetyan
Created October 11, 2015 10:12
Show Gist options
  • Save karapetyan/3887c24c66ff59ee2ca9 to your computer and use it in GitHub Desktop.
Save karapetyan/3887c24c66ff59ee2ca9 to your computer and use it in GitHub Desktop.
class Pentagon
def initialize(i)
(i * (3 * i - 1) / 2)
end
end
pe = Pentagon.new(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment