课程设计万年历的设计(编辑修改稿)内容摘要:
tminute()59) { thissetminute(0)。 thissethour(thisgethour()+1)。 if(thisgethour()23) { thissethour(0)。 thissetday(thisgetday()+1)。 if(thisgetday()mon_day( thisgetyear() ,thisgetmonth())) { thissetday(1)。 thissetmonth(thisgetmonth()+1)。 if(thisgetmonth() 12) { thissetmonth(1)。 thissetyear(thisgetyear()+1)。 } } } } } return *this。 } 19 datetime datetime::operator=(datetime amp。 t) { thissetyear(())。 thissetmonth(())。 thissetday(())。 thissethour(())。 thissetminute(())。 thissetsecond(())。 return *this。 } datetime datetime::operator+(datetime amp。 t) { if((thisgetyear()+())1900) { thissetyear(1900)。 } else thissetyear((thisgetyear()+()))。 if((thisgetmonth()+())12 || (thisgetmonth()+())=0) { thissetmonth(1)。 } 20 else thissetmonth((thisgetmonth()+()))。 int maxday=0。 if((thisgetyear()+())==2) { if(isleapyear((thisgetyear()+()))) { maxday=29。 } else { maxday=28。 } } else { maxday=mon[thisgetmonth()+()]。 } if((thisgetday()+())maxday ||(thisgetday()+())=0) { thissetday(1)。 } thissetday((thisgetday()+()))。 return *this。 } int dayinyear(datetime amp。 t)//日期在年中的天数 21 { int i=0,day=0。 for(i=1。 i()。 i++) { day+=mon_day((),i)。 } day+=()。 return day。 } void getweek( datetime amp。 t)//判断天数对应星期 { int week=0。 int diffday。 if(()==1900) { if(()==1) { diffday=()1。 } else { diffday=dayinyear(t)1。 } } else { 22 int d1=getyearday(1900)1。 int d2=dayinyear(t)。 int d3=0。 int year=0。 for(year=1901。 year()。 year++) { d3+=getyearday(year)。 } diffday=d1+d2+d3。 } week=diffday%7。 switch(week) { case 0: (星期一 )。 break。 case 1: (星期二 )。 break。 case 2: (星期三 )。 break。 case 3: (星期四 )。 break。 case 4: (星期五 )。 break。 case 5: (星期六 )。 break。 case 6: (星期天 )。 break。 23 } cout() endl。 } int getmonthfirst(datetime amp。 t)//返回对应月的第一天星期数 { datetime temp((),(),1,(),(),())。 getweek( temp)。 //判断对应星期数 if(()==星期一 ) return 1。 else if(()==星期二 ) return 2。 else if(()==星期三 ) return 3。 else if(()==星期四 ) return 4。 else if(()==星期五 ) return 5。 else if(()==星期六 ) return 6。 else return 7。 } void showmonth(datetime amp。 t)//打印当前月日历 24 { int i=0。 coutMonday Tusday Wedday Thuday Friday Satday Sundayendl。 int j=0。 int k=1。 int num=getmonthfirst(t)。 cout。 for(k=1。 k=8num。 k++) coutk。 coutendl。 for(i=k。 i=mon_day((),())。 i++) { int flag=1。 int first=k。 if(i10) { cout i。 } else couti。 if((ik)==6) { coutendl。 k=i+1。 } } 25 } void stuation1(datetime amp。 t)//计算两日期相差天数 { int nyear=0。 int nmonth=0。 int nday=0。 int nhour=0。 int nminute=0。 int nsecond。 cout请输入 年 月 日: endl。 cinnyearnmonthnday。 cout请输入 时 分 秒: endl。 cinnhournminutensecond。 datetime temp ( nyear, nmonth,nday, nhour, nminute,nsecond)。 int diffday=0。 if(()==nyear) { if(()==nmonth) { diffday=abs(()nday)。 } else { diffday=abs(dayinyear(t)dayinyear(temp))。 } } else if(nyear()) { int d1=getyearday(())dayinyear(temp)。 int d2=dayinyear(t)。 26 int d3=0。 int year=0。 for(year=nyear。 year()。 year++) { d3+=getyearday(year)。 } diffday=d1+d2+d3。 } else { int d1=getyearday(())dayinyear(t)。 int d2=dayinyear(temp)。 int d3=0。 int year=0。 for(year=()。 yearnyear。 year++) { d3+=getyearday(year)。 } diffday=d1+d2+d3。 } cout与原日期 相隔的天数为 : diffdayendl。 } int monthsurplus(datetime amp。 t)//当月剩余天数 { return mon_day((),())()。 } int yearsurplus(datetime amp。 t)//当年剩余天数 27 { return getyearday(())dayinyear(t)。 } void stuation2(datetime amp。 t ) { int diffday=0。 int lastday=0。 int lastmonth=0。 in。课程设计万年历的设计(编辑修改稿)
相关推荐
分析…………资金筹措投资估算效益分析除灰 DCS系统检修作业文件包 . 经济管理市场分析国内外市场情况预测……………………竞争力分析…………资金筹措投资估算效益分析 (毕业设计 ) DS18B20数字温度计论文 .经济管理市场分析国内外市场情况预测……………………竞争力分析…………资金筹措投资估算效益分析户式中央空调工程施工组织设计 . 经济管理市场分析国内外市场情况预测…………………
创新能力强、保障安全和营养健康,具有较强国际竞争力的现代食品产业,提高食品产业对社会的贡献度,巩固食品产业在新时期扩大城乡居民消费 、带动相关产业发展和促进社会和谐稳定中的支柱地位。 到 2020 年,食品工业总产值达到 万亿元,增长 100%,年均增长 15%;利税达到 万亿元,增长 75%,年均增长 12%。 食品工业总产值与农业总产值之比提高到 :1。
工件将不能向上滑移。 根据前所分析工件在料道滑移的条件可知, 角的极限值与 角和摩擦系数 有关, 从公式 sh = co ss in co ss ing j = co ss in co ss ing 使 sh j 可得: tg max 2 tg 2
系统 中 , 对 JSP 完美的支持就像 Server 系列对 ASP 一样结合很完美。 安装比较方便,只需要下载解压完成,把网站代码拷贝到 Tomcat 空间就可以访问本地网站了。 实际上 Tomcat 部分是 Apache 服务器的扩展。 请假管理系统设计与应用 5 系统开发的思想与技术 JSP 技术与 MVC 模式以及系统的基本框架 本系统采用 Jsp 技术,基于 MVC 模式开发,使用
中的一个非常重要的环节而且必不可少的。 有效的端点检测技术不仅能减少系统的处理时间、提高系统的处理实时性,而且能排除无声段的噪声干扰,从而使后面工作的性能得以较大提高 [5],[6]。 随着越来越多的学者对语音端点检测技术的关注 ,大量的新的语音端点检测算法相继被提出,而基于同一种算法又有不同的方法。 例如对于熵值参数特征的检测算法,有基于信息熵 [7],[8]、基于自适应子带谱熵 [9]
和 产生 和 的直流电源供系统使用。 C2 可以防止电感效应而产生的自激, C6 的 作用是 减弱因为负载上的电流瞬时变化时引起的高频干扰,C5 的 作用是 进一步减小输出电压 的波动 ,使电源输出更加稳定。 D1 是电源工作的 指示灯。 O u t2In3Gnd1G N DU1 A M S 11 17 2. 5R41k2. 5 VD1L E DR 000 A 3 .3 VGND1O U