class Program
{
static void Main(string[] args)
{
int n;
Console.Write("Enter
the number : ");
n
= int.Parse(Console.ReadLine());
if ((n % 4 == 0) && ((n % 100 == 0) || (n %
400 != 0)))
{
Console.WriteLine(n + " is a leap year");
}
else
{
Console.WriteLine(n + " is not a leap year");
}
Console.ReadLine();
}


No comments:
Post a Comment