Not quite sure if I got that...
My code now:
#include <stdio.h>
int main ( )
{
int hours;
int min;
int hours2;
int min2;
int total;
int minutes, time_h, time_min;
int diff;
int diff_hr;
int diff_mn;
printf("\Give first time in form h min (example 12 34):");
scanf("%d %d", &hours, &min);
printf("\Give second time in form h min (example 12 34):");
scanf("%d %d", &hours2, &min2);
if ((hours >= 0)&&(hours <=23)&&(min >= 0)&&(min<=59))
{
total = hours / 60 + min - hours2 / 60 + min2;
printf("\n");
minutes = 1440 - (min + 60*hours);
diff = (hours*min) - (hours2*min2);
diff_hr = diff / 60;
diff_mn = diff % 60;
time_h = minutes / 60;
time_min = minutes % 60;
printf("test1 %d minutes test2 %d minutes %d %d", total, diff, diff_hr, diff_mn);
}
else
printf("You gave incorrect clock time!");
return 0;
}
Didn't help... but I'm not sure if you meant this...