1. 首页
  2. 编程语言
  3. C
  4. C语言程序设计报告—“万年历”.

C语言程序设计报告—“万年历”.

上传者: 2020-05-01 21:30:13上传 DOC文件 67KB 热度 14次
#include"stdio.h" intjudge(intyear,intmonth)/*定义一个函数,把月分为四类(28,29,30,31)*/ { if(month==1||month==3||month==5||month==7||month==8||month==10||month==12) return(1);/*31天的月份,返回值为1*/ elseif(month==2) { if(year%4!=0||year%100==0&&year%400!=0) return(2);/*平年的2月份,返回值为2*/ elsereturn(3);/*闰年的2
下载地址
用户评论