diff --git a/年历月历.c b/年历月历.c new file mode 100644 index 0000000..5f6d26f --- /dev/null +++ b/年历月历.c @@ -0,0 +1,178 @@ +#include +#include +#include +#include<> + +// ÿÔÂÌìÊý +#include +int month_day(int year,int month) +{ + switch(month) + { + case 1: + case 3: + case 5: + case 7: + case 8: + case 10: + case 12: + return 31;break; + + case 4: + case 6: + case 9: + case 11: + return 30;break; + + case 2: + if((year%4==0)&&(year%100!=0)||(year%400==0)) + { + return 29; + break; + } + else + { + return 28; + break; + } + } +} + + +// ÄêÀú + +void year_calendar(int year) +{ + int month,days,weekday,sum_day; + int i,j; + + year; + printf("ÇëÊäÈëÒª²éѯµÄÄê·Ý£º"); + scanf("%d",&year); + for(i=1;i