|
|
|Store|
|
|
|
|
|
|
|
|
CTK Exchange
Gary
guest
|
Feb-06-02, 10:39 PM (EST) |
|
"problem solving. CRitical thinking"
|
A programmer is making a program that will create calenders. The Program will contain calendar pages with just the days of the week and the dates, no months. The user will insert the name of the month before printing the calendar. It a page will exist for every arrangement of dates in a month, how many pages will need to be designed? |
|
Alert | IP |
Printer-friendly page | Edit |
Reply |
Reply With Quote | Top |
|
|
|
Laocon
Member since Jan-18-02
|
Feb-07-02, 07:07 AM (EST) |
|
2. "RE: number of calendar pages"
In response to message #1
|
"30 days hath September..." Work out how many month-types there are (grouping by the number of days). eg MONTH TYPE 1 = 30 day-month = September, April, June, November Each month type, must begin on one of seven days. Now multiply MONTH TYPES * 7... OR... There is a formula for working out the day of the week from the date. You could try incorporating that somehow. |
|
Alert | IP |
Printer-friendly page | Edit |
Reply |
Reply With Quote | Top |
|
|
|
|
Jack Wert
guest
|
Feb-07-02, 09:10 PM (EST) |
|
3. "RE: number of calendar pages"
In response to message #2
|
You did not state the format for the days and dates. Would it be a series of rows of seven days, starting, say, with Sundays"? If so, I think Laocon’s response is valid: 4*7 layouts for the 30 day months, 4 layouts for the 28 day months, 4 layouts for the leap year 29 day months, and 7*7 layouts for the 31 day months. Then, as Laocon suggested, there is a way to equate the year with the day on which 01 January falls. The rest could than be related to that for any given year. The proper layout for any month could then equate to that start, the starting day being "x" days later in the year. If I remember correctly, the only other correction occurs only every 200 years or so, and that is therefore not a consideration for current calendar constructions. Jack
|
|
Alert | IP |
Printer-friendly page | Edit |
Reply |
Reply With Quote | Top |
|
|
|
amit
guest
|
Nov-12-03, 07:30 PM (EST) |
|
4. "CRitical thinking"
In response to message #0
|
Say we start with jan, first index will say day and second no. of days Jan - (0,31) Feb - (3,28) Mar - (3,31) Apr - (6,30) May - (1,31) Jun - (4,30) Jul - (6,31) Aug - (2,31) Sep - (5,30) Oct - (0,31) Nov - (3,30) Dec - (5,31) Only Jan and Oct are same. so in total there will be 11*7 = 77 Pages. |
|
Alert | IP |
Printer-friendly page | Edit |
Reply |
Reply With Quote | Top |
|
|
You may be curious to have a look at the old CTK Exchange archive. Please do not post there.
|Front page|
|Contents|
Copyright © 1996-2018 Alexander Bogomolny
71546169
|
|
|