about | help | code help+videos | done | prefs |
Years that are divisible by 4 are leap years, but with some exceptions: any year divisible by 100 is NOT a leap year, unless it is also divisible by 400. Write a method that returns true if a given year is a leap year, and false otherwise. CHALLENGE: Write this with a return statement and no "if" statements. isLeap(2024) → true isLeap(2013) → false isLeap(2500) → false ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy