12 lines
225 B
Text
12 lines
225 B
Text
function p(y)
|
|
p = (y + int(y/4) - int(y/100) + int(y/400)) mod 7
|
|
end function
|
|
|
|
function isLongYear(y)
|
|
isLongYear = (p(y) = 4) or (p(y -1) = 3)
|
|
end function
|
|
|
|
for y = 2000 to 2100
|
|
if isLongYear(y) then print y
|
|
next y
|
|
end
|