Checks for closest flight to given time -- C program