Write a function that checks whether a given year is leap year or not.
Answers
Answered by
5
To determine whether a year is a leap year, follow these steps:
If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.The year is a leap year (it has 366 days).The year is not a leap year (it has 365 days).
If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.The year is a leap year (it has 366 days).The year is not a leap year (it has 365 days).
Answered by
0
You can count a leap year by using this...
--If the year is exactly divisible by 4 then it is a leap year (in some cases) {such as 2020 = (0 remainder ). if it leaves 1 as a remainder than the year is surely not a leap year. If it leaves 2 as a remainder than the year is not a leap year.}
--If the year is exactly divisible by 4 then it is a leap year (in some cases) {such as 2020 = (0 remainder ). if it leaves 1 as a remainder than the year is surely not a leap year. If it leaves 2 as a remainder than the year is not a leap year.}
Similar questions