Post

Replies

Boosts

Views

Activity

Reply to Leap Year Exercise in Lesson 11 (Making Decisions.Playground)
I came up with the following logic, which works and is quite simple: let aYear =  1300 func isLeap() { if aYear % 400 == 0 {   print("YES") } else if aYear % 4 == 0 && aYear % 100 != 0 { print("YES")  } else {   print("NO") } } isLeap()
Replies
Boosts
Views
Activity
Jun ’22