Select Page

IF – THEN Percentage Example

This sample code checks to see if a given year is a LEAP year… var aYear = Int.self func isLeap(year: Int) { var leap = “NO” //IF divisible by 4 with no remainders. if year % 4 == 0 { leap = “YES” //Is leap year, unless: } if year % 100...