鸟语天空
判断闰年
post by:追风剑情 2019-3-15 23:43
// 判断year年是否为闰年
public static bool IsLeapYear(int year)
{
       bool b1 = (year % 4 == 0) && (year % 100 != 0);
       bool b2 = (year % 400 == 0);
       return b1 || b2;
}
评论:
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容