UMBC CMSC 201 Spring '05 CSEE | 201 | 201 S'05 | lectures | news | resources |discussion| help


	  
% ls
dates.c  dates.h  design.txt  proj1.c
% gcc -c -Wall -ansi proj1.c
% gcc -c -Wall -ansi dates.c
% gcc proj1.o dates.o
% ls
a.out*  dates.c  dates.h  dates.o  design.txt  proj1.c  proj1.o
% a.out

+-------------------------------------------------------------------+
|                          DATAPALOOZA!                             |
| This program ...  Put a greeting here that briefly tells that     |
| user what the program does in a few sentences.  We aren't giving  |
| you an example, because you would just cut and paste it into your |
| program!  Thinking about how to describe your program to users is |
| part of the problem. ...                                          |
+-------------------------------------------------------------------+

Please enter a date to get started:
Year?
Please enter an integer between 1753 and 9999: 2005
Month?
Please enter an integer between 1 and 12: 2
Day?
Please enter an integer between 1 and 28: 23


Options:
  1: Print Date
  2: Print Month
  3: Print Year
  4: Print days between this date and another
  5: Reset date
  6: Quit
Your choice?
Please enter an integer between 1 and 6: 1

Wednesday February 23, 2005

Options:
  1: Print Date
  2: Print Month
  3: Print Year
  4: Print days between this date and another
  5: Reset date
  6: Quit
Your choice?
Please enter an integer between 1 and 6: 2

     February 2005
 SU MO TU WE TH FR SA
        1  2  3  4  5
  6  7  8  9 10 11 12
 13 14 15 16 17 18 19
 20 21 22 23 24 25 26
 27 28


Options:
  1: Print Date
  2: Print Month
  3: Print Year
  4: Print days between this date and another
  5: Reset date
  6: Quit
Your choice?
Please enter an integer between 1 and 6: 3

     January 2005
 SU MO TU WE TH FR SA
                    1
  2  3  4  5  6  7  8
  9 10 11 12 13 14 15
 16 17 18 19 20 21 22
 23 24 25 26 27 28 29
 30 31

     February 2005
 SU MO TU WE TH FR SA
        1  2  3  4  5
  6  7  8  9 10 11 12
 13 14 15 16 17 18 19
 20 21 22 23 24 25 26
 27 28

     March 2005
 SU MO TU WE TH FR SA
        1  2  3  4  5
  6  7  8  9 10 11 12
 13 14 15 16 17 18 19
 20 21 22 23 24 25 26
 27 28 29 30 31

     April 2005
 SU MO TU WE TH FR SA
                 1  2
  3  4  5  6  7  8  9
 10 11 12 13 14 15 16
 17 18 19 20 21 22 23
 24 25 26 27 28 29 30

     May 2005
 SU MO TU WE TH FR SA
  1  2  3  4  5  6  7
  8  9 10 11 12 13 14
 15 16 17 18 19 20 21
 22 23 24 25 26 27 28
 29 30 31

     June 2005
 SU MO TU WE TH FR SA
           1  2  3  4
  5  6  7  8  9 10 11
 12 13 14 15 16 17 18
 19 20 21 22 23 24 25
 26 27 28 29 30

     July 2005
 SU MO TU WE TH FR SA
                 1  2
  3  4  5  6  7  8  9
 10 11 12 13 14 15 16
 17 18 19 20 21 22 23
 24 25 26 27 28 29 30
 31

     August 2005
 SU MO TU WE TH FR SA
     1  2  3  4  5  6
  7  8  9 10 11 12 13
 14 15 16 17 18 19 20
 21 22 23 24 25 26 27
 28 29 30 31

     September 2005
 SU MO TU WE TH FR SA
              1  2  3
  4  5  6  7  8  9 10
 11 12 13 14 15 16 17
 18 19 20 21 22 23 24
 25 26 27 28 29 30

     October 2005
 SU MO TU WE TH FR SA
                    1
  2  3  4  5  6  7  8
  9 10 11 12 13 14 15
 16 17 18 19 20 21 22
 23 24 25 26 27 28 29
 30 31

     November 2005
 SU MO TU WE TH FR SA
        1  2  3  4  5
  6  7  8  9 10 11 12
 13 14 15 16 17 18 19
 20 21 22 23 24 25 26
 27 28 29 30

     December 2005
 SU MO TU WE TH FR SA
              1  2  3  
  4  5  6  7  8  9 10 
 11 12 13 14 15 16 17 
 18 19 20 21 22 23 24 
 25 26 27 28 29 30 31



Options:
  1: Print Date
  2: Print Month
  3: Print Year
  4: Print days between this date and another
  5: Reset date
  6: Quit
Your choice?
Please enter an integer between 1 and 6: 4

Please enter the other date.
Year?
Please enter an integer between 1753 and 9999: 2001
Month?
Please enter an integer between 1 and 12: 9
Day?
Please enter an integer between 1 and 30: 11

There are 1261 days between Wednesday February 23, 2005 and Tuesday September 11, 2001.


Options:
  1: Print Date
  2: Print Month
  3: Print Year
  4: Print days between this date and another
  5: Reset date
  6: Quit
Your choice?
Please enter an integer between 1 and 6: 6

%
% a.out

+-------------------------------------------------------------------+
|                          DATAPALOOZA!                             |
| This program ...  Put a greeting here that briefly tells that     |
| user what the program does in a few sentences.  We aren't giving  |
| you an example, because you would just cut and paste it into your |
| program!  Thinking about how to describe your program to users is |
| part of the problem. ...                                          |
+-------------------------------------------------------------------+

Please enter a date to get started:
Year?
Please enter an integer between 1753 and 9999: 1492
Please enter an integer between 1753 and 9999: 1969
Month?
Please enter an integer between 1 and 12: 21
Please enter an integer between 1 and 12: 7
Day?
Please enter an integer between 1 and 31: 21


Options:
  1: Print Date
  2: Print Month
  3: Print Year
  4: Print days between this date and another
  5: Reset date
  6: Quit
Your choice?
Please enter an integer between 1 and 6: 1

Monday July 21, 1969

Options:
  1: Print Date
  2: Print Month
  3: Print Year
  4: Print days between this date and another
  5: Reset date
  6: Quit
Your choice?
Please enter an integer between 1 and 6: 6
%


CSEE | 201 | 201 S'05 | lectures | news | resources | help |

Monday, 28-Feb-2005 11:45:56 EST