chapter 6 example for checking leap year