posted 19 years ago
Hi friends,
This is the problem. I would be highly obliged if anyone could get me a sample code for this.
Regards
Sunny
Given two dates (during the years 1901 and 2999, inclusive), find the number of days between the two dates.
Input: Six sets of data. Each set has two dates in the format month, day, year. For example, the input line '6, 2, 1983, 6, 22, 1983' represents
June 2, 1983 to June 22, 1983.
Output: The number of days between the given dates, excluding the starting date and the ending date. For example, there are 19 days between June 2, 1983 and June 22, 1983; namely, June 3, 4, ..., 21.
Sample Input (3 sets):
Input Line #1: 6, 2, 1983, 6, 22, 1983
Output #1: 19
Input Line #2: 7, 4, 1984, 12, 25, 1984
Output #2: 173
Input Line #3: 1, 3, 1989, 3, 8, 1983
Output #3: 1979
Sunny Nambiar<br />Senior Software Engineer