Leap years. Write a functionbool leap_year(int year)that tests whether a year is a leap

Chapter 5, Problem P5.21

(choose chapter or problem)

Leap years. Write a functionbool leap_year(int year)that tests whether a year is a leap year: that is, a year with366 days. Leap years are necessary to keep the calendarsynchronized with the sun because the earth revolvesaround the sun once every 365.25 days. Actually, thatfigure is not entirely precise, and for all dates after 1582 theGregorian correction applies. Usu ally years that are divisible by 4 are leap years, forexample 1996. However, years that are divisible by 100 (for example, 1900) are notleap years, but years that are divisible by 400 are leap years (for example, 2000).

Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.

Becoming a subscriber
Or look for another answer

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back