Skip to content

Instantly share code, notes, and snippets.

@karapetyan
Created October 11, 2015 10:10
Show Gist options
  • Save karapetyan/8cf3cd9627fe52df99bf to your computer and use it in GitHub Desktop.
Save karapetyan/8cf3cd9627fe52df99bf to your computer and use it in GitHub Desktop.
class Pentagon
def initialize(i)
puts (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