# leap year program

• 05-23-2011
camel-man
leap year program
Assuming that January 1st of a certain leap year is a Monday, i have to compute the day of the week for a given date in that year. could someone help me out with my some pseudo code of how i should go about doing this? im not quite sure how to compute it.
• 05-23-2011
CommonTater
Yep... read up on the functions provided by the time library... #include the time.h header...
• 05-23-2011
camel-man
do they have a function like that?
• 05-23-2011
CommonTater
Welllllll... you might try actually looking up the library documentation... If you don't have it locally with your compiler... Google is your friend.
• 05-23-2011
quzah
I think he's supposed to write this one by hand. This is a classic exercise, and there is actually a formula for calculating if a year is based on leap year. Behold, the power of the internet!

Quzah.
• 05-23-2011
CommonTater
Quote:

Originally Posted by quzah
I think he's supposed to write this one by hand. This is a classic exercise, and there is actually a formula for calculating if a year is based on leap year. Behold, the power of the internet!

Quzah.

LOL... in that case.... nevermind!... :D

It's not all that hard to do by hand just add up the days in each month, etc...