C++ Program to Check Leap Year
What is Leap Year?
A leap year is a calendar year containing one additional day added to keep the calendar year synchronized with the astronomical or seasonal year. For example, 2024 is a leap year.
Tips: It is recommended to use our online Leap Year calculator for better understanding.
Condition for Leap Year
To check whether a year is a leap year or not, the year should satisfy at least one of the following two conditions
- A year should be exactly divisible by 4, but, not by 100.
- A year should be exactly divisible by 4, 100 and 400 at the same time.
Check Leap Year
In the following example, we will check whether the given year (2012) is leap year or not.
Leap Years between the Given Range
In the following example, we will find all the Leap Years between 2000 and 2030.
Check Leap Year for any Given Year
In the following example, we will check whether the given year is a leap year or not.
Hi Developers, we almost covered 90% of String functions and Interview Question on C++ with examples for quick and easy learning.
We are working to cover every Single Concept in C++.
Please do google search for:
Join Our Channel
This channel is primarily useful for Full Stack Web Developer.