Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func isLeapYear(_ year: Int) -> Bool {
- if number(year, isDivisibleBy: 4) {
- if number(year, isDivisibleBy: 100) {
- if number(year, isDivisibleBy: 400) {
- // Fill in this code...
- return true
- } else {
- return false
- }
- return false
- } else {
- return true
- }
- return true
- } else {
- return false
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement