• 大小: 28KB
    文件类型: .cpp
    金币: 1
    下载: 0 次
    发布日期: 2021-05-13
  • 语言: C/C++
  • 标签: 日历  C语言  农历  

资源简介

本程序利用C语言输出包含农历和阳历的日历,农历显示在阳历下方。此外还可以打印年历,星座查询、历史上的今天等功能。

资源截图

代码片段和文件信息

#include 
#include 
#include 
#include 
#include 
#include 

int get_date( int * );                                                                                          /* 获取时间的函数 */


bool if_leap( int );                                                                                            /* 判断是否是闰年 */


int get_today_day( int * int );                                                                                /* 获取今天的是第几号 */


int get_today_week( int * );                                                                                    /* 获取今天是星期几 */


int get_today_month( int * );                                                                                   /* 获取今天是第几月 */


int get_today_year( int * );                                                                                    /* 获取今天是第几年 */


int show( int );                                                                                                /* 调用打印日历函数的函数 */


int max_day( int int );                                                                                        /* 获取本月最大天数 */


int print_month( int int );                                                                                    /* 输出月份信息 */


int fprint_month( int FILE * );                                                                                /* 输出月份信息到文件中 */


int print_calendar( int int int int int );                                                                  /* 打印日历 */


int firstday( int int int int );                                                                             /* 计算第一天是星期几 */


int LandN();                                                                                                    /* 处理上个月或者下个月的信息 */


int any_year();                                                                                                 /* 处理任意年,月的 */


int constellations( int );                                                                                      /* 获得星座 */


int show_today( int int int int int );                                                                      /* 打印出今天的日期 */


int print_year_calendar( int );                                                                                 /* 打印出某一年的日历 */


int print_calendar_to_file( int int int int int );                                                          /* 把日历打印到文件中 */


int history();                                                                                                  /* 历史上的今天模块 */


void output( int year int month int day );                                                                    /* 输出农历 (包括年月日) */


int LunarCalendar( int * int year int month int day );                                                       /* 农历日期计算函数 */


void outputlunar( int year int month int day );                                               

评论

共有 条评论