思路有点阻塞了
[microcai-thesis-at-zstu.git] / doc / chapter / chap-final.tex
blob2137eae16f0172fdef3cd870c931df2a5e087712
1 %
2 % int dayofweek(int y, int m, int d) /* 0 = Sunday */
3 %{
4 % static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
5 % y -= m 3;
6 % return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7;
7 %}