#include #include #include char*month_str[]={"January","February","March","April","May","June","July","August","September","Octoer","November","December"}; char* week[]={"星期日","星期一","星期二","星期三","星期四","星期五","星期六"}; char* festivals[] = {"1,1","2,14","3,8","3,12","3,15","4,1","4,5","5,1","5,4", "6,1","7,1","8,1","9,10","10,1","12,25"}; int IsLeapYear(int year) /*判断是否是闰年*/ { if((year%4==0&&year%100!=0)|| (year%400==0)) //这⾥是判断是否是闰年的 return 1; //如果是闰年就返回值1 else return 0;//不是的话返回0 } int month_day(int year,int month) //这个函数⽤来判断 这年的月分有多少天的 { int mon_day[]={31,28,31,30,31,30,31,31,30,31,30,31}; if(IsLeapYear(year)&&month==2) /*判断是否是闰年,如果是闰年⽽且这个⽉是2⽉那这个月有29天*/ return 29; else return(mon_day[month-1]); } int DaySearch(int year,int month,int day) /*这个函数是计算输入的日期对应的星期*/ { int c=0; float s; int m; for(m=1;m