Advertisement
mhdew

Leap year function

Mar 26th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int checkLP(long long a)
  2. {
  3. int flag=0;
  4.  
  5. if(a%4==0){
  6. if(a%100==0){
  7. if(a%400==0){
  8. flag=1;
  9. }
  10. else{
  11. flag=0;
  12. }
  13. }
  14. else{
  15. flag=0;
  16. }
  17. }
  18. else{
  19. flag=0;
  20. }
  21.  
  22. return flag;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement