using System;
using System.Globalization;
class MainClass {
public static void Main() {
//
int[] years = { 1984, 2000, 1999, 2002 };
for (int i = 0; i < years.Length; ++i) {
if (DateTime.IsLeapYear(years[i]))
Console.WriteLine("Year {0} is a leap year", years[i]);
else
Console.WriteLine("Year {0} is NOT a leap year", years[i]);
}
}
}
|