Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

1.3 question

 
Steven YaegerII
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
In other words, I want to type
java Leap 2000
and see
leap year!
...In the three conditional sentences above, is the thinking:
" 2000 is evenly divisible by 4, so it is a leap year.
except 2000 is evenly divisible by 100, so it isn't a leap year.
except 2000 is evenly divisible by 400, so finally, it is a leap year. "
...I was going to post something else until I had the above thoughts
See Ya
 
paul wheaton
Trailboss
Pie
Posts: 21341
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have it right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic