求 C语言编写一万年历系统

来源:百度知道 编辑:UC知道 时间:2024/05/11 21:30:28
1.模仿现实生活中的挂历.
2.当前页以系统当前日期的月份为准显示当前月的每一天(显示出日及对应的星期几).
3.当系统日期变到下一月是,系统自动翻页到下一月.

最好是有流程图, 没有也可以拉..
谢谢大家了....! 等待中喔

TC 2.0

/* welcome to use the WanNianLi system!
Copyright @ 2005 KongXinCai All rights reserved!:):):)*/

#include<stdio.h>
#include<stdlib.h>

char* month_str[]={"January","February","March","April","May","June","July","August","September","October","November","December"};
char* week[]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};

int IsLeapYear(int year) /*find out the year is leap year or not*/
{
if((year%4==0&&year%100!=0)||(year%400==0))
return 1;
else
return 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)
return 29;
else
return(mon