摘要: 3.判断日期是一年的第几天参数返回值解析:参数: y:int,年份; m:int,月份 d:int,日期返回值: sum:传入日期是当年的第几天;函数解析: leapyear(y);判断y是不是闰年,参考(2)闰年判断;链接地址:http://www.cnblogs.com/kongkaikai/p... 阅读全文
posted @ 2015-07-25 16:45 孔凡凯凯 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 2.闰年判断参数返回值解析:参数: a:int,年份;返回值: 1:闰年; 0:非闰年; 1 int leapyear(int a) 2 3 { 4 5 if(a%400==0) 6 7 { 8 9 return 1;10 11 }12 13 ... 阅读全文
posted @ 2015-07-25 16:43 孔凡凯凯 阅读(790) 评论(0) 推荐(0) 编辑
摘要: 1、随机数函数参数返回值解析:参数: a:int,数字范围最小值; b:int,数字范围最大值;返回值: 1:闰年; 0:非闰年;备注: a-b的绝对值不能超过int的最大值(65535);头文件: time.h 、stdlib.h;#include #include #include int ra... 阅读全文
posted @ 2015-07-25 16:42 孔凡凯凯 阅读(157) 评论(0) 推荐(0) 编辑