标签:
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);
}
}
}
标签:
原文地址:http://www.cnblogs.com/dlexia/p/4389060.html