#include main() { int Hours1,Hours2,Mins1,Mins2,ElapsedHours,ElapsedMins; printf("Hello, I am the time wizard!\n\n"); printf("Please enter two separate times, and I'll tell you\n"); printf("the amount of time elapsed between the two times.\n"); printf("All times must be in the 24-hour clock format "); printf("-- e.g. 4:30 p.m.=1630\n\n"); printf("Beginning with the greater time, enter the hours, then\n"); printf("enter the minutes.\n\n"); scanf("%d %d",&Hours1,&Mins1); printf("Now enter the hours, then enter the minutes, of the\n"); printf("lesser time.\n\n"); scanf("%d %d",&Hours2,&Mins2); if (Mins1 < Mins2) Hours1 = Hours1 - 1; Mins1 = Mins1 + 60; ElapsedHours = Hours1 - Hours2; ElapsedMins = Mins1 - Mins2; printf("The elapsed time is %d hours and %d minutes.\n",ElapsedHours,ElapsedMins); }