判断某年是否是闰年c#代码

newtonianapple 61 0 RAR 2018-12-26 15:12:02

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);

用户评论
请输入评论内容
评分:
暂无评论