int Easter (int year) { int century; int skipped; int golden; int correction; int epact; int Paschal; int Sunday; int date; century = year / 100 + 1; skipped = 3 * century / 4; golden = year % 19 + 1; correction = (8 * century + 5) / 25; epact = (11 * golden + correction - skipped + 26) % 30 + 1; Paschal = 44 - epact; if (Paschal < 21) { Paschal += 30;} if (Paschal == 50 || Paschal == 49 && golden > 11) { Paschal --;} Sunday = 5 - (5 * year / 4 - skipped); date = Paschal + 7 - (Paschal - Sunday) % 7; return date;}
The permanent URI of this web page
is
http://tobybartels.name/MATH112/2003/C/
.