Skip to content

Instantly share code, notes, and snippets.

@byronmejia
Created April 8, 2016 09:52
Show Gist options
  • Save byronmejia/116c3568d69f5d825f49c2b6b17532e5 to your computer and use it in GitHub Desktop.
Save byronmejia/116c3568d69f5d825f49c2b6b17532e5 to your computer and use it in GitHub Desktop.
# Create an app that completes the following:
# - Leap Years
# - if x is divisible by 4, but not 100
def leap(number)
(((number % 4) == 0) && !((number % 100) == 0))
end
puts leap(4)
puts leap(100)
puts leap(8)
puts leap(120)
puts leap(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment