exercism

Exercism solutions.
git clone git://code.dwrz.net/exercism
Log | Files | Refs

README.md (1027B)


      1 # Leap
      2 
      3 Given a year, report if it is a leap year.
      4 
      5 The tricky thing here is that a leap year in the Gregorian calendar occurs:
      6 
      7 ```plain
      8 on every year that is evenly divisible by 4
      9   except every year that is evenly divisible by 100
     10     unless the year is also evenly divisible by 400
     11 ```
     12 
     13 For example, 1997 is not a leap year, but 1996 is.  1900 is not a leap
     14 year, but 2000 is.
     15 
     16 If your language provides a method in the standard library that does
     17 this look-up, pretend it doesn't exist and implement it yourself.
     18 
     19 ## Notes
     20 
     21 Though our exercise adopts some very simple rules, there is more to
     22 learn!
     23 
     24 For a delightful, four minute explanation of the whole leap year
     25 phenomenon, go watch [this youtube video][video].
     26 
     27 [video]: http://www.youtube.com/watch?v=xX96xng7sAE
     28 ## Source
     29 
     30 JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp)
     31 
     32 ## Submitting Incomplete Solutions
     33 It's possible to submit an incomplete solution so you can see how others have completed the exercise.