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+ny ears+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
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+ny ears+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