From 24a68155df90f196a8e4ec4460ad2c1b322126f8 Mon Sep 17 00:00:00 2001 From: 15067812422 <15067812422> Date: Mon, 7 Jan 2019 10:17:49 +0800 Subject: [PATCH] first commit --- 年历显示.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 年历显示.c diff --git a/年历显示.c b/年历显示.c new file mode 100644 index 0000000..c8da472 --- /dev/null +++ b/年历显示.c @@ -0,0 +1,125 @@ +#include + +//ÅжÏÈòÄê +void f(year) +{ + int year,day; + if(year%4==0&&year%100!=0||year%400==0) + return 1; + else + return 0; +} + +void max_day(int year,int month) +{ + int month_day[12]={31,28,31,30,31,30,31,31,30,31,30,31}; + if(f(year)==1) + mouth[1]=29; + return month_day[month-1]; +} + +//year×ÜÌìÊý +void max_day(int year,int month,int day) +{ + int sum=0,i; + for(i=1;i