Skip to content

Instantly share code, notes, and snippets.

@PierraKimathi-zz
Created February 3, 2019 21:37
Show Gist options
  • Save PierraKimathi-zz/4818e63a0454dda27237e3a63b629018 to your computer and use it in GitHub Desktop.
Save PierraKimathi-zz/4818e63a0454dda27237e3a63b629018 to your computer and use it in GitHub Desktop.
determining if a year is leap or not
bool IsLeapYear(int year)
{
return (!(year % 400) || (!(year % 4) && year % 100));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment