static void Main(string[] args)
{
while (true)
{
string rn = Console.ReadLine();
string s = "";
try
{
DateTime rn1 = Convert.ToDateTime(rn + "-2-29");
s = "年是闰年";
}
catch (Exception)
{
s = "年不是闰年";
}
finally
{
Console.WriteLine(rn+s);
}
}
}
时间: 2024-10-13 16:21:04