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