Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class CheckLeapYear
- {
- static void Main()
- {
- int nYear = int.Parse(Console.ReadLine());
- bool bResult = DateTime.IsLeapYear(nYear);
- if (bResult.Equals(true))
- {
- Console.WriteLine("{0} is a Leap year",nYear);
- }
- else
- {
- Console.WriteLine("{0} is NOT a Leap year", nYear);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment