Sign InCreate Account

Upgrade to Pro

Upgrade Now

Coding Workspace

EditorProjectsPractice QuestionsTimed Mock ExamsFlowcharts

PseudoEditor AI

Pseudocode TutorCode GeneratorCode FixerCode Converter
Back to Problems
PreviousNext

Sign in to run tests against edge cases and save your code automatically.

Problem Description

Medium

Count Leap Years

PROModular Programming
Boolean 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

Success Rate:

0% (0 passed / 0 attempted)

Code

Draft auto-saved

Test Results

Click "Test Code" to evaluate your code against the tests.

Product

For SchoolsOverviewFeaturesFAQ
PseudoEditor

© 2026 PseudoEditor. All rights reserved.