Count Leap Years
PROModular ProgrammingBoolean Functions
Leap Years
Iteration
Write a function `IsLeap(year)` that returns `TRUE` if the year is a leap year and `FALSE` otherwise. A year is a leap year if it is divisible by 400, or divisible by 4 but not by 100.
Then write a main program that inputs a start year and an end year (the start year is never later than the end year), uses your function to count how many leap years there are from the start year to the end year **inclusive**, and outputs the count.
For example, between 2000 and 2024 there are 7 leap years.
Example Input
2000
2024
Example Output
7
0% (0 passed / 0 attempted)