1 2 3 4 5 6 7 8 9 10 11 12 13 |
static void Main(string[] args) { int year; Console.Write("Enter the Year :"); year = Convert.ToInt32(Console.ReadLine()); if (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)) Console.WriteLine("{0} is Leap Year",year); else Console.WriteLine("{0} is not a Leap Year",year); Console.ReadLine(); } |