using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace runnian
{
class Program
{
static void Main(string[] args)
{
Console.Write("输入年 如2008: ");
string s = Console.ReadLine().ToUpper();
int x=int.Parse(s);
if (x % 4 == 0 && x%100 != 0 || x % 400 == 0)
{
Console.WriteLine("{0}本年为闰年!",x);
}
else
{
Console.WriteLine("{0}本年不为闰年!",x);
}
Console.ReadLine();
}
}
}
判断闰年
最新推荐文章于 2023-02-26 15:19:02 发布