By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

the entries in a logbook store information about a specific month.

P: 1
the entries in a logbook store information about a specific month.a calendar provides a natural format for displaying this monthly data.
void displayCalendar () const

Requirements:
logbook month must occur in a year in the range 1901-2099.
in order to produce a calendar for a given month,you need to know on which day of the week the first day of the month occurs.the day of the week corresponding to a date month/day/year can be computed using the follwing fomula.

dayofweek=(1+nyears+nleapyears+nDaysToMonth)%7

where nyears is the number of years since 1901,nleapyears is the number of years since 1901,and nDaysToMonth is the number of days from the start of the year to the start of the month.
the program must be in c++
hint:
this problem is the in-lab exercise1 in the book of A Laboratory Course in C++ Data Structures 2003
Oct 21 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.