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

上传:newtonianapple 浏览: 59 推荐: 0 文件:RAR 大小:21.08KB 上传时间:2018-12-26 15:22: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);
上传资源
用户评论