The George Washington University
School of Engineering and Applied Science
Department of Computer Science

CSci 51 -- Introduction to Computing -- Spring 2000
Lab #6
For labs meeting Feb. 24-25, 2000

The purpose of this exercise is to give you more practice working with nested loops and conditional statements.

Make a copy of your Project 3 program, then modify it so that it prompts the user for a calendar year, then displays the date and day of the week for every day in that year.  The input and output formats will be the same as in Project 3. The number of days in each month is given below:

     Jan -> 31          Jul -> 31
     Feb -> 28 or 29    Aug -> 31
     Mar -> 31          Sep -> 30
     Apr -> 30          Oct -> 31
     May -> 31          Nov -> 30
     Jun -> 30          Dec -> 31
To obtain a file output from your program, use the redirection character ">" and do notuse "gexecute" command. Instead, use the example given below. The "gexecute" script does not support output redirection.

lab_06.exe >datefile.dat