博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
期中考试
阅读量:6872 次
发布时间:2019-06-26

本文共 702 字,大约阅读时间需要 2 分钟。

1 #include "date.h" 2 #include "utils.h"  3 #include 
4 using std::cout; 5 using std::endl; 6 Date::Date() 7 { 8 year=1970; 9 month=1;10 day=1;11 }12 Date::Date(int y,int m,int d)13 {14 year=y;15 month=m;16 day=d;17 }18 int Date::getYear() const19 {20 return year;21 }22 int Date::getMonth() const23 {24 return month;25 }26 int Date::getDay() const27 {28 return day;29 }30 int Date::dayOfYear()31 {32 int a[12]={
31,28,31,30,31,30,31,31,30,31,30,31};33 if( (year % 4 == 0 && year % 100 !=0) || (year % 400 == 0) )34 {35 a[1]=29;36 }37 int i,sum=0;38 for(i=0;i

 

转载于:https://www.cnblogs.com/0122Frank/p/10795955.html

你可能感兴趣的文章
Codeforces Round #287 (Div. 2) ABCDE
查看>>
ios Debug
查看>>
【转载】读懂IL代码就这么简单(二)
查看>>
09-JS的事件流的概念(重点)
查看>>
有关inline-block
查看>>
文献随笔(九)
查看>>
git相关
查看>>
加入大型的js文件如jQuery文件,Eclipse会报错
查看>>
POJ 2763 (树链剖分+边修改+边查询)
查看>>
全局变量---只创建一次
查看>>
IOS APP上下黑边问题
查看>>
数位dp题集
查看>>
4-删除、更名
查看>>
C# 汉字转拼音
查看>>
MySQL小知识点
查看>>
jquery实现复制的两种方式
查看>>
一分钟读懂互联网广告竞价策略GFP+GSP+VCG
查看>>
Wannafly 挑战赛 19 参考题解
查看>>
HDU 5666 Segment
查看>>
POJ 2062 HDU 1528 ZOJ 2223 Card Game Cheater
查看>>