Console.WriteLine("请输入一个年份");
int n;
n = Convert.ToInt32(Console.ReadLine());
if (n % 400 == 0 || n % 4 == 0 && n % 100 != 0)
{
Console.WriteLine("是闰年");
}
else
{
Console.WriteLine("不是闰年");
}
时间: 2024-10-20 22:40:48