Question: Hello, I need help wiht this question and was wondering if anyone can EXPLAIN how to solve this question. Thank you! The leap year algorithm
Hello, I need help wiht this question and was wondering if anyone can EXPLAIN how to solve this question.
Thank you!

The leap year algorithm is:

Extend the leap year algorithm so that it tells you when the next leap year will be, if the input year is not a leap year. (We know the year is not a leap year) (To get to this step, year must be divisible by 4) Divide the year by 4 IF the remainder isnt 0 RETURN false Divide the year by 100 IF the remainder isnt 0 RETURN true Divide the year by 400 IF the remainder isnto RETURN false (We know the year is a leap year) (We know the year is not a divisible-by-400 leap year) (The year is a divisible-by-400 leap year) RETURN true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
