判断某年是否是闰年c#代码
Console.WriteLine("请输入年份:"); str = Console.ReadLine(); year = Int32.Parse(str); isleap = (year % 4 ==0&&year%100==0||year %400 ==0); str = isleap ? "是" : "不是"; Console.WriteLine("{0}年{1}闰年。",year,str);
Console.WriteLine("请输入年份:"); str = Console.ReadLine(); year = Int32.Parse(str); isleap = (year % 4 ==0&&year%100==0||year %400 ==0); str = isleap ? "是" : "不是"; Console.WriteLine("{0}年{1}闰年。",year,str);