# Assignment 1.3 - conflicting Specs.

Shama Khan

Ranch Hand

Posts: 185

posted 16 years ago

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

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

Posts: 7

posted 16 years ago

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?

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?