diff --git a/solutions/go/leap/1/leap.go b/solutions/go/leap/1/leap.go new file mode 100644 index 0000000..30e5bfc --- /dev/null +++ b/solutions/go/leap/1/leap.go @@ -0,0 +1,11 @@ +// This is a "stub" file. It's a little start on your solution. +// It's not a complete solution though; you have to write some code. + +// Package leap should have a package comment that summarizes what it's about. +// https://golang.org/doc/effective_go.html#commentary +package leap + +// IsLeapYear should have a comment documenting it. +func IsLeapYear(year int) bool { + return year%4==0 && (year%100!=0 || year%400==0) +}