文件名称:calendar
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:6.94kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编程思路:按照以上背景知识可得判断闰年的规律:某年年份如果能被4整除但不能被100整除,或者能被400整除则是闰年。由此规则可推得计算万年历的公式:
s=X-1+[X-1]/4-[X-1]/100+[x-1]/400+c 上式中:X为公元年数(如2003年);C 为从元旦起,到要算的那天总数(如2003年3月23日,C=31+28+23=82)。S/7余数是星期几。
-Programming idea: In accordance with the above background knowledge available to determine the law of a leap year: a year to be 4 years if divisible by 100 but not divisible, or can be divisible by 400 is a leap year. This rule may push calendar calculation formula: s = X-1+ [X-1]/4- [X-1]/100+ [x-1]/400+ c the type in: X number of years for the Year [such as in 2003] C starting from New Year' s Day to the day to count the total number of [such as March 23, 2003, C = 31+28+23 = 82]. S/7 more than the number of the week.
s=X-1+[X-1]/4-[X-1]/100+[x-1]/400+c 上式中:X为公元年数(如2003年);C 为从元旦起,到要算的那天总数(如2003年3月23日,C=31+28+23=82)。S/7余数是星期几。
-Programming idea: In accordance with the above background knowledge available to determine the law of a leap year: a year to be 4 years if divisible by 100 but not divisible, or can be divisible by 400 is a leap year. This rule may push calendar calculation formula: s = X-1+ [X-1]/4- [X-1]/100+ [x-1]/400+ c the type in: X number of years for the Year [such as in 2003] C starting from New Year' s Day to the day to count the total number of [such as March 23, 2003, C = 31+28+23 = 82]. S/7 more than the number of the week.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
4_32.opt
4_32.ncb
4_32.plg
4_32.cpp
4_32.dsp
4_32.dsw
4_32.ncb
4_32.plg
4_32.cpp
4_32.dsp
4_32.dsw
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.