Skip to content

Instantly share code, notes, and snippets.

@Vivek-abstract
Created August 12, 2017 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vivek-abstract/08715c3704e5d04a8f2f9c2dcc32c3ed to your computer and use it in GitHub Desktop.
Save Vivek-abstract/08715c3704e5d04a8f2f9c2dcc32c3ed to your computer and use it in GitHub Desktop.
class Leap { // Do not erase this line
// Write the check_leap function below this line
public static int check_leap(int y) {
if(y % 4 == 0) {
if(y % 100 == 0) {
if(y % 400 == 0) {
return 1;
} else {
return 0;
}
}
return 1;
} else {
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment