Easter by 51b

void main(){for(int c,e,y=2000;y++<3e3;printf("%02d %*s, 0%d
",~-e%31+1,e>31?"APRIL":"MARCH",y))c=y/100+1,e=(y%19*11+8+(8*c+5)/25-3*c/4)%30,e!=25|y%19<11&&e-24||e++,e=51+e/24*30-e,e-=(5*y/4-3*c/4+2+e)%7;}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page