RosettaCodeData/Task/Leap-year/C-sharp/leap-year.cs
2023-07-01 13:44:08 -04:00

14 lines
338 B
C#

using System;
class Program
{
static void Main()
{
foreach (var year in new[] { 1900, 1994, 1996, DateTime.Now.Year })
{
Console.WriteLine("{0} is {1}a leap year.",
year,
DateTime.IsLeapYear(year) ? string.Empty : "not ");
}
}
}