| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 850 人关注过本帖
标题:初学者问题
只看楼主 加入收藏
vaccine
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-3-3
收藏
 问题点数:0 回复次数:2 
初学者问题
use functional decomposition to write a c++ program that takes a number in the range of 0 to 6 and second number in the range of 1 to 366 as input. the first number represents the day of week on which the year begins, where 0 is sunday, and so on. the senond num indicates the day of the year. the program the outputs the name of the day of the week corresponding to the day of the year. the number of the day of the week can be computed as: (start day + day of year - 1)%7

我不明白这公式是什么意思。start day 是 0~6 里的一个数? day of year 是1~366 里的数?随便赋个值进去,如果结果是28.5714。。。。。那我怎么能知道它是星期几阿??/
搜索更多相关主题的帖子: day number year week 
2008-03-03 07:52
vaccine
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-3-3
收藏
得分:0 
帮忙解释下~~~
2008-03-04 04:23
sunkaidong
Rank: 4
来 自:南京师范大学
等 级:贵宾
威 望:12
帖 子:4496
专家分:141
注 册:2006-12-28
收藏
得分:0 
1楼说得结果不会出现,是取余,不是整除

学习需要安静。。海盗要重新来过。。
2008-03-04 09:07
快速回复:初学者问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016676 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved