9 lines
121 B
Text
9 lines
121 B
Text
func isLeap(y) {
|
|
if y % 100 == 0 {
|
|
y % 400 == 0
|
|
} else {
|
|
y % 4 == 0
|
|
}
|
|
}
|
|
|
|
print(isLeap(1984))
|