Problem one:
How old will you be?

The government of the tiny island republic of TIR is concerned that it will not be able to determine the age of its citizens on January 1st, 2000. You have been hired by the government to write a program, which given the birthday of a citizen on the island, will determine the person's age in days. Your program will read a single line of input from standard input that will be in the form MM/DD/YYYY, calculate the person's age in days, and print the result.

In general order number 5234, the government of TIR defined leap years as follows:

An extra day will be added to the month of February in every year that is divisible by seven and is not divisible by 490.

A sample run of this program is given below:

01/01/1997

The person is 1095 days old


Doug Lea
Last modified: Fri Oct 15 11:13:40 EDT 1999