Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _1.LeapYear
- {
- /*Write a program that reads a year from the console and checks whether it is a leap. Use DateTime.*/
- class Program
- {
- static void Main(string[] args)
- {
- ushort year = ushort.Parse(Console.ReadLine());
- bool isleap = DateTime.IsLeapYear(year);
- Console.WriteLine("Is {0} leap year? {1}", year, isleap);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement