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

qq_56520 20 0 DOC 2019-09-03 05:09:52

用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

用户评论
请输入评论内容
评分:
Generic placeholder image 卡了网匿名网友 2019-09-03 05:09:52

程序虽小,写的不错!