Difference between revisions of "Print a Calendar"
From CompSciWiki
Line 7: | Line 7: | ||
function printMonth(int firstDay, int numDays) | function printMonth(int firstDay, int numDays) | ||
</code> | </code> | ||
− | + | |SideSectionTitle= | |
|SideSection= | |SideSection= | ||
[[Image:OperatingSystemExample.jpg|float|267px]] | [[Image:OperatingSystemExample.jpg|float|267px]] | ||
Line 17: | Line 17: | ||
|Solution=The solution... | |Solution=The solution... | ||
+ | |Code=Start coding here | ||
}} | }} |
Revision as of 11:53, 1 April 2010
Back to the Program-A-Day homepage
ProblemHow do we use two loops to print out a calendar month? We'll start this one easy. Make a function that takes two parameters: One that says what day of the week the first day of the month is, the other how many days are in the particular month. Your function prototype should look like
function printMonth(int firstDay, int numDays)
|
An image or By Students section | |
---|---|---|
SolutionThe solution... | ||
CodeSolutionCode goes here. Please DO NOT put your code in <pre> tags! |