Homework 8

Assigned 4/6/05

Task: Write a program in which you define a struct to store time information. At a minimum you should store hours, minutes, and seconds. If you are feeling ambitious, you can also store day, month, and year. Your program should ask the user for two times and use a function to calculate the difference in hours, minutes, and seconds (and days, months, and years if appropriate) between those two times. The program should tell the user the result.

For example, if the user enters 03:15:45 and 12:18:22, the program should return some variation on 09:02:37.

Purpose: To practice using structs with functions.