public static void Main()
Console.WriteLine("Enter a year after 1600:");
userYear = int.Parse(Console.ReadLine());
Console.WriteLine("Not a valid year after 1600. Try again");
if (userYear % 4 == 0 && userYear % 100 != 0 ||
userYear % 4 == 0 && userYear % 100 == 0 && userYear % 400 == 0)
Console.WriteLine(userYear + " is a leap year!");
Console.WriteLine(userYear + " is not a leap year!");
int nextLeap = userYear + 1;
nextLeap += (nextLeap % 4);
if (nextLeap % 4 == 0 && nextLeap % 100 != 0 ||
nextLeap % 4 == 0 && nextLeap % 100 == 0 && nextLeap % 400 == 0)
Console.WriteLine("The next leap year is " + nextLeap);
} while (isLeapYear != true);
Console.WriteLine("Would you like to try another year?");
userRepeat = Console.ReadLine().ToLower();
} while (userRepeat != "no");