In this blog we will learn Check Leap Year using VB.NET.
In this blog we will check the provided year is leap year or not?
Code for Check Leap Year using VB.NET
[php]
using System;
namespace Program
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter Year : ");
int Year = int.Parse(Console.ReadLine());
if (((Year % 4 == 0) && (Year % 100 != 0)) || (Year % 400 == 0)) Console.WriteLine("{0} is a Leap Year.", Year);
else Console.WriteLine("{0} is not a Leap Year.", Year);
Console.ReadLine();
Console.ReadLine();
}
}
}
[/php]
Output