Write a program that accepts a year and determines whether the year is a leap year. Use the mod function.

The output should be the variable extra_day, which should be 1 if the year is a leap year and 0 otherwise.

The rules for determining leap years in the Gregorian calendar are as follows:

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

1. All years evenly divisible by 400 are leap years.

2. Years evenly divisible by 100 but not by 400 are not leap years.

3. Years divisible by 4 but not by 100 are leap years.

4. All other years are not leap years.

For example, the years 1800, 1900, 2100, 2300, and 2500 are not leap years, but 2400 is a leap year.


"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"