let dMax = [31,28,31,30,31,30,31,31,30,31,30,31] var count = 0 for month in 1...12{ for day in 1...dMax[month - 1]{ if month == day % 10 + day / 10{ count = count + 1 } } } print(count)