Advertisement
wpl36

Untitled

Aug 7th, 2021
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. func isLeapYear(_ year: Int) -> Bool {
  2. if number(year, isDivisibleBy: 4) {
  3.  
  4.  
  5.  
  6. if number(year, isDivisibleBy: 100) {
  7.  
  8.  
  9.  
  10.  
  11.  
  12. if number(year, isDivisibleBy: 400) {
  13. // Fill in this code...
  14. return true
  15. } else {
  16. return false
  17. }
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. return false
  26. } else {
  27. return true
  28. }
  29.  
  30.  
  31.  
  32. return true
  33. } else {
  34. return false
  35. }
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement