using System; namespace ConsoleApplication1 { /// /// Summary description for Leap. /// public class Leap { public static bool LeapYear(int year) { bool is_leap; if( (year%4 == 0 && year%100!=0) || year%400==0) is_leap = true; else is_leap = false; return is_leap; } public static void Main() { int year; char answer; do { Console.Write("\nPlease input year number:"); year = int.Parse(Console.ReadLine()); if(LeapYear(year)) Console.WriteLine("It is a leap year"); else Console.WriteLine("It is not a leap year"); Console.Write("\nConitue, yes(Y) or no(N)?: "); answer = Console.ReadLine()[0]; }while(answer!='N' && answer!='n'); } } }