万年历阴阳历转化

万年历阴阳历转化

ID:11127382

大小:31.00 KB

页数:7页

时间:2018-07-10

万年历阴阳历转化_第1页
万年历阴阳历转化_第2页
万年历阴阳历转化_第3页
万年历阴阳历转化_第4页
万年历阴阳历转化_第5页
资源描述:

《万年历阴阳历转化》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、#include#includeusingnamespacestd;intSum,A[12],b[12],M,D,w[2];intY1[]={101,214,308,312,315,401,501,504,512,601,701,801,910,1001,1006,1024,1225,0};charstr1[][18]={"元旦","情人节","妇女节","植树节","消费者权益日","愚人节","劳动节","青年节","护士节","儿童节","建党节","建军节","教师节","国庆节","老人节","联

2、合国日","圣诞节"};intY2[]={101,115,505,707,815,909,1208,1224,1230,0};charstr2[][18]={"*农历春节","元宵节","端午节","七夕情人节","*中秋节","重阳节","腊八节","小年","*除夕"};charjie[][9]={"小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"};ints

3、tr[]={0,21208,42467,63836,85337,107014,128867,150921,173149,195551,218072,240693,263343,285989,308563,331033,353350,375494,397447,419210,440795,462224,483532,504758};intjudge(intyear)//判断是否是闰年{if((year%4==0&&year%100!=0)

4、

5、year%400==0)return(1);elsereturn(0);}voidDate(intw[]){i

6、nti,j,y,n;doubles;y=w[0];n=w[1];s=31556925974.7*(y-1900)/60000+str[n]+5*1440+125;for(i=1900;i=0;i++){s-=b[i]*1440;}s+=b[i-1]*1440;w[0]=i;for(j=0;s>=0;j++){s-=1440;}w[1]=j;}voidmain(){voidyinli();intyear,month,day,y,i,j,z,a[100],s,N;b[0

7、]=31;b[2]=31;b[3]=30;b[4]=31;b[5]=30;b[6]=31;b[7]=31;b[8]=30;b[9]=31;b[10]=30;b[11]=31;SYSTEMTIMEsys;intYEAR,MONTH,DAY;sys.wYear=2012;sys.wMonth=06;sys.wDay=01;cout<<"请输入日期:";cin>>YEAR>>MONTH>>DAY;sys.wYear=YEAR;sys.wMonth=MONTH;sys.wDay=DAY;cout<<"Thecurrenttimeis:"<<'';yea

8、r=sys.wYear;month=sys.wMonth;day=sys.wDay;cout<

9、j]=w[0]*100+w[1];j++;}if((month==w[0])&&(day==w[1])){if(N==1)cout<<".";cout<

10、break;default:Sum=1+b[10]+day;}}else{for(i=0;i

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。