using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int x;
Console.WriteLine("请输入年份");
x = Convert.ToInt32(Console.ReadLine());
if (x % 4 != 0)
{
Console.WriteLine("不是闰年");
}
else
{
if (x % 100 == 0 && x % 400 != 0) //被100整除不被400整除
{
Console.WriteLine("不是闰年");
}
else //被4整除或被400整除
Console.WriteLine("是闰年");
}
Console.ReadKey();
}
}
}