about | help | code help+videos | done | prefs |
In general, a year is a leap-year if it is divisible by 4. However, if it also divisible by 100 then it is not, UNLESS it is also divisible by 400, in which case it is. Write a method that takes a year as a parameter and decides if the year is a leap year or not, returning a boolean. isLeap(16) → true isLeap(100) → false isLeap(800) → true ...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: 210
Copyright Nick Parlante 2017 - privacy