- #1
SnakeDoc
- 27
- 1
Homework Statement
So I created two arrays one called departure_time and the other arrival_time and populate each array as follows. I've tried both putting 8 and defining N as 8
int departure_times[N]={480, 538, 679, 767, 840, 945, 1140, 1305};
int arrival_times[N]={616, 712, 811, 900, 968, 1075, 1280, 1438};
I get two errors.
The first is that it says "excess elements in array initializer"
The second is that when I print out the element
printf("arrival time in minutes past midnight: %d", arrival_times[7]);
it returns either a 0 or a number from the other array
So am I missing something?