Assignment #4 - 91B

Assignment #4 - 91B


Assignment 4(FORTRAN)                           T.A. Frank Huang
=====================                           Weight 30
                                                Due 10 Oct 1991

Write a function named NDAYS that operates on two dates submitted
to it as six integer arguments (month2, day2, year2, month1,
day1, year1).  After operating on these values, NDAYS returns
an integer indicating the number of days between the two dates.

For example, NDAYS(6,18,1980,6,7,1979) will return a value of 366
(remember that February of 1980 had a 29th day) plus 11 or 377.
You may assume that both year2 and year1 will be in the twentieth
century and that the date represented by the first three arguments
always will be later in time than the date represented by the
fourth, fifth and sixth arguments.

Use an input date (month2, day2, year2) of zero to stop the run.

Write a simple main program for use with NDAYS.
Here are some suggested lists of arguments for testing purposes:

10, 10, 1977, 10, 10, 1974
10, 10, 1977, 10, 10, 1957
 3, 16, 1981, 12, 31, 1972
12, 31, 1980,  3,  1, 1979
 0,  0,    0,  0,  0,    0