Click to See Complete Forum and Search --> : Need Help w/ Program!!!!
I am new to C++ and doing this program to print a calender for one year, given
the year and day of the week Jan 1 falls on. I have no clue how to start
it....
jonnin
06-13-2001, 04:24 PM
1) Get a leap year as a base and determine if the requested year is a leap
year.
2). Determine the number of days for each month (there is a poem somewhere)...
=)
3) create an array from 0..6 for sun..sat
4) increment a var to find day of week:
x = given_day; //(you convert sun, mon, etc to 0..6)
for(d = 0; d< 366; d++) //correct for leap year by adding a day to feb's
//max days...
{
...
x = x++ % 7; //keeps days correct
}
5) fill in the other stuff.
"Nick" <nickandsarah@melenka77.com> wrote:
>
>I am new to C++ and doing this program to print a calender for one year,
given
>the year and day of the week Jan 1 falls on. I have no clue how to start
>it....
devx.com
Copyright Internet.com Inc. All Rights Reserved