资源描述:
《毕业论文c 万年历生成及农历公历转换查询软件源代码》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、附件二万年历生成及农历公历转换查询软件源代码#include#include#include/*函数声明*/nl();gn();ng();yl();intpdy(inty);intpdgd();pdm();pdnd();intNongLi(int*n1,int*n2,int*n3,int*nr);/*全局变量*//*天干名称*/constchar*cTianGan[11]={"癸","甲","乙","丙","丁","戊","己","庚","辛","壬","癸"};/*地支名称*/constchar*cDiZ
2、hi[13]={"亥","子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"};/*属相名称*/constchar*cShuXiang[13]={"猪","鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"};/*农历日期名*/constchar*cDayName[]={"*","初一","初二","初三","初四","初五","初六","初七","初八","初九","初十","十一","十二","十三","十四","十五","十六","十七","十八","十九","二十","
3、廿一","廿二","廿三","廿四","廿五","廿六","廿七","廿八","廿九","三十"};/*农历月份名*/constchar*cMonName[]={"*","正","二","三","四","五","六","七","八","九","十","十一","腊"};/*公历每月前面的天数*/constintgmd[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};mm[13]={0,31,0,31,30,31,30,31,31,30,31,30,31};/*农历数据定义先以H2B函数还原成长度为18的字符
4、串,其定义如下:'前12个字节代表1-12月:1为大月,0为小月;压缩成十六进制(1-3位)'第13位为闰月的情况,1为大月30天,0为小月29天;(4位)'第14位为闰月的月份,如果不是闰月为0,否则给出月份(5位)'最后4位为当年农历新年的公历日期,如0131代表1月31日;当作数值转十六进制(6-7位)'农历常量(1899~2100,共202年)*/constlongNongliData[202]={0xAB500D2,0x4BD0883,0x4AE00DB,0xA5700D0,0x54D0581,0xD2600D8,0xD9500CC,0xD,0x56
5、A00D5,0x9AD00CA,0x55D027A,0x4AE00D2,0xA5B0682,0xA4D00DA,0xD2500CE,0xD25157E,0xB5500D6,0x56A00CC,0xADA027B,0x95B00D3,0x49717C9,0x49B00DC,0xA4B00D0,0xB4B0580,0x6A500D8,0x6D400CD,0xAB5147C,0x2B600D5,0x95700CA,0x52F027B,0x49700D2,0x,0xD4A00D9,0xEA500CE,0x6A9157E,0x5AD00D6,0x2B600CC,0x86
6、E137C,0x92E00D3,0xC8D1783,0xC9500DB,0xD4A00D0,0xD8A167F,0xB5500D7,0x56A00CD,0xA5B147D,0x25D00D5,0x92D00CA,0xD2B027A,0xA9500D2,0xB,0x6CA00D9,0xB5500CE,0xF,0x4DA00D6,0xA5B00CB,0xC,0x52B00D4,0xA9A0883,0xE9500DA,0x6AA00D0,0xAEA0680,0xAB500D7,0x4B600CD,0xAAE047D,0xA5700D5,0x52600CA,0xF,0
7、xD9500D1,0x5B50782,0x56A00D9,0x96D00CE,0x4DD057F,0x4AD00D7,0xA4D00CB,0xD4D047B,0xD2500D3,0xD,0xB5400DA,0xB6A00CF,0x95A1680,0x95B00D8,0x49B00CD,0xA97047D,0xA4B00D5,0xB270ACA,0x6A500DC,0x6D400D1,0xAF40681,0xAB600D9,0x93700CE,0x4AF057F,0x49700D7,0x64B00CC,0x74A037B,0xEA500D2,0x6B50883,
8、0x5AC00DB,0xAB600CF