文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>zeller.algorithms

zeller.algorithms

时间:2010-09-02  来源:reesun

Let A, B, C, D denote  integer variables that have the  following values: A  =  the  month  of  the  year,  with  March  having  the  value  1,  April  the value  2,  .  .  .,  December  the  value  10,  and  January  and  February  being counted  as  months  11  and  12  of  the  preceding  year  (in  which case,subtract  1  from  C) B  =  the  day  of  the  month  (1,  2,  3,  .  .  .  ,  30,  31) C  =  the  year  of  the  century  (e.g.  C  =  89  for  the  year  1989) D  =  the  century  (e.g.  D  =  19  for  the  year  1989)
Note:  if the month  is January or February, then the preceding year  is used for computation.  This is because there was a period in history when March 1st, not January 1st, was the beginning of the year. 
Let W, X, Y, Z, R also denote  integer variables.  Compute their values  in the following order using  integer arithmetic:  W  =  (13*A  - 1)  /  5  X = C / 4  Y = D / 4  Z  =  W  +  X  +  Y  +  B  +  C  - 2*D  R  =  the  remainder  when  Z  is  divided  by  7 
The R is what we want to know
相关阅读 更多 +
排行榜 更多 +
找茬脑洞的世界安卓版

找茬脑洞的世界安卓版

休闲益智 下载
滑板英雄跑酷2手游

滑板英雄跑酷2手游

休闲益智 下载
披萨对对看下载

披萨对对看下载

休闲益智 下载