In Class Lab

Exploring Structures

 

Write a program that computes how long a job took given a start time and an end time  (Assume both are on the same date).

 

Use a structure, jobTime, to store information about the times. The time structure has three members:  hours, min and sec.

 

Your program should declare two of these structures, startTime and endTime.  It prompts the user for values for startTime and endTime (BY CALLING A FUNCTION THAT ACCEPTS a structure parameter and initializes it using cin statements).

 

Your program prints out how long the job took (DO THIS WORK IN A FUNCTION AS WELL).

 

Extra Credit:  Add date information to the start and end times, so that a job can start at 06:02:23 on 2/3/1998 and end at 05:00:00 on 2/7/1999