Checking to see if an array is filled
I'm working on two programs that both involve scheduling. The program reads in a data file, calculates some times (all in military), and fills in the appropriate spots with a 1. It then checks to see if spots conflict with each other. (For instance, if an event runs from 13 to 18 on one day, and another runs on the same day from 17 to 20). If no conflicts appear, then the schedules are okay to use. If there are conflicts, then the program says that the user has double booked. This is what I came up with at the moment to see if it would do what I want:
Code:
if((start_index <= schedule[i]) || (schedule[i] <= end_index))
printf("Sorry, you double booked yourself again. \n");
else
printf("Good job, no conflicts! \n");
I know this isn't right, but I'm still thinking of other combinations and am not having much luck. Can you guys steer me on the right path?