// program to add two times given in hours and minutes // wdg 2009 #include int main ( ) { const int MINUTES = 60; // 60 minutes in an hour int totHours, totMins; // store total hours and mins int hours, mins; // for reading next time printf("Enter 1st time: hrs mins "); scanf("%d%d", &hours, &mins ); totHours = hours; totMins = mins; printf("Enter 2nd time: hrs mins "); scanf("%d%d", &hours, &mins ); totMins = totMins + mins; totHours = totHours + hours + totMins / MINUTES; totMins = totMins % MINUTES; printf("Total is \n%d hours \nand %d minutes\n", totHours, totMins); return 0; }