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 IFelse
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Enter year: ");
- int year = int.Parse(Console.ReadLine());
- if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
- {
- Console.WriteLine("Leap year");
- }
- else
- {
- Console.WriteLine("Not leap year");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement