home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / easter12.zip / EASTER.PAS < prev   
Pascal/Delphi Source File  |  1993-05-04  |  588b  |  21 lines

  1. program easter;    {By D. Engler ver 1.2  5-4-93}
  2. var a,b,c,d,e,f,x,m:word;
  3. begin
  4.     readln(x);  { 4-digit year }
  5.     a:= x mod 19;
  6.     b:=x mod 4;
  7.     c:=x mod 7;
  8.     d:=(19*a+24) mod 30;
  9.     f:=0; if x<2500 then f:=3;  {correction}
  10.           if x<2300 then f:=2;  {for}
  11.           if x<2200 then f:=1;  {centuries}
  12.           if x<2100 then f:=0;
  13.           if x<1900 then f:=6;
  14.           if x<1800 then f:=5;
  15.           if x<1700 then f:=4;
  16.     e:=(2*b+4*c+6*d+5+f) mod 7;
  17.     e:=22+d+e;
  18.     m:=3; if e>31 then begin m:=4; e:=e-31 end;
  19.     write(m,'-',e,'-',x)
  20. end.
  21.