Difference between revisions of "Print a Calendar"

From CompSciWiki
Jump to: navigation, search
Line 1: Line 1:
{{1010PrAD|ProblemName=The name of the program
+
{{1010PrAD|ProblemName=Text Based Calendar
  
|Problem= The problem is Edwin
+
|Problem=How 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
 +
<code>
 +
  function printMonth(int firstDay, int numDays)
 +
</code>
  
 
|SideSection=
 
|SideSection=

Revision as of 11:52, 1 April 2010

Back to the Program-A-Day homepage

Problem

How 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)

 

SideSectionTitle

float
Taken from http://www.flickr.com/photos/daniello/565304023/

An image or By Students section

Solution

The solution...

Code

SolutionCode goes here. Please DO NOT put your code in <pre> tags!

Back to the Program-A-Day homepage