Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool is_leap_year(int year)
- {
- bool bLeap = false;
- if (year % 4 == 0) {
- if (year % 100 == 0) {
- if (year % 400 == 0) {
- bLeap = true;
- }
- else {
- bLeap = false;
- }
- }
- else {
- bLeap = true;
- }
- }
- else {
- bLeap = false;
- }
- return bLeap;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement