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 LeapYearApp
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num;
- Console.WriteLine("Input number: ");
- num = Convert.ToInt32(Console.ReadLine());
- if(num % 4 ==0 && num % 100!=0 || (num % 400 == 0))
- {
- Console.WriteLine(num + " is a Leap Year");
- }
- else
- {
- Console.WriteLine(num + " is not a Leap Year");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement