aspose file tools*
The moose likes Cattle Drive and the fly likes Assignment 1.3 -  conflicting Specs. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Assignment 1.3 -  conflicting Specs." Watch "Assignment 1.3 -  conflicting Specs." New topic
Author

Assignment 1.3 - conflicting Specs.

Shama Khan
Ranch Hand

Joined: Aug 14, 2000
Posts: 185
Assignment wording:
a leap year occurs on every year that is evenly divisible by 4
except every year that is evenly divisible by 100
except every year that is evenly divisible by 400.
>java Leap 2000
>leap year!

My words: The way I am reading the specs, the year 2000 shouldn't be a leap year because eventhough it's divisible by 4, it is also divisible by 100 and 400!
so is the year 100 or 400 a leap year or not?
I read the specs so many times before finally posting this!
Shama


Shama
Rosie Suayan
Greenhorn

Joined: Nov 29, 2000
Posts: 7
2000 is divisible by 4 therefore it is a leap year,
but 2000 is divisible by 100 so it's not a leap year,
but 2000 is divisible by 400 so it is a leap year.
A leap year happens every 4 years. But years divisible by 100 aren't leap years unless they are also divisible by 400.
Hope that sort of clears it up?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assignment 1.3 - conflicting Specs.