Code:// code to solve elapsed time between two entered times #include <stdio.h> struct time { int hr; int min; int sec; }; int elapsed_time (struct time1, struct time2) { struct time time1, time2, diff; diff.hr = time2.hr - time1.hr; if (time2.hr < time1.hr) diff.hr = diff.hr + 12; diff.min = time2.min - time1.min; if (time2.min < time1.min) diff.min = diff.min + 60; diff.sec = time2.sec - time1.sec; if (time2.sec < time1.sec) diff.sec = diff.sec + 60; return diff; } int main (void) { int stopit; struct time diff, time1, time2; int elapsed_time (struct time1, struct time2); printf ("Enter a military time (i.e. 24 hour basis) in the format hh:mm:ss\n"); scanf ("%i:%i:%i", &time1.hr, &time1.min, &time1.sec); printf ("Enter a second military time using the same format.\n"); scanf ("%i:%i:%i", &time2.hr, &time2.min, &time2.sec); diff = elapsed_time (time1, time2); printf ("The elapsed time between the two times entered is %.2i:%.2i:%.2i\n", diff.hr, diff.min, diff.sec); scanf ("%d", &stopit); return 0; }