RosettaCodeData/Task/Leap-year/Prolog/leap-year-3.pro

3 lines
143 B
Prolog

?- findall(Y, (between(1990,2030,Y),day_of_the_year(date(Y,12,31),366)), L).
L = [1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028].