一:DateTime.IsLeapYear 方法判断是否是闰年 二:代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace GetDays { public pa
)),' then '平年' else '闰年' end as isLeapYear from dual 第一步:取日期的年初日期:第二步:年初日期增加一个月即概念2月:第三步:取概念2月的最后一天的日进行判断,如为28则平,如为29则闰 -------------------------------------------------------
public class year{ public static void main(String[] args){ int year=2010; if((year%4==0&&year%100!=0)||(year%400==0)){ System.out.println(year+"年是闰年"); }else{ System.out.println(year+"年是平年"); } } }
//输入一个年份,判断是否是闰年 //(能被4整除却不能被100整除的,年份世纪年份能被400整除的是闰年) Console.Write("请输入一个年份:"); int year = int.Parse(Console.ReadLine()); && year <= ) { == && year % != || year % == ) { Console.WriteLine("您输入的年份是闰年"); } else { Con
1.正则(了解) 1.基本的正则表达式(看懂即可) 字符类[abc] a.b 或 c(简单类)[^abc] 任何字符,除了 a.b 或 c(否定)[a-zA-Z] a 到 z 或 A 到 Z,两头的字母包括在内(范围)[0-9] 0到9的字符都包括[a-d[m-p]] a 到 d 或 m 到 p:[a-dm-p](并集)[a-z&&[def]] d.e 或 f(交集)[a-z&&[^bc]] a 到 z,除了 b 和 c:[ad-z](减去)[a-z&&[^