1. 首页
  2. 编程语言
  3. C
  4. 用c语言编写万年历代码在VC环境中编译

用c语言编写万年历代码在VC环境中编译

上传者: 2019-09-03 05:02:52上传 DOC文件 70KB 热度 21次
用C语言编写万年历源程序代码,#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
下载地址
用户评论
码姐姐匿名网友 2019-09-03 05:02:52

程序虽小,写的不错!