I'll try to explain it step by step:
index = 0: sets the index variable to 0 (duh)
index <= 5: as long as this condition is met, the for loop will be executed
index ++: after each loop, the index variable is increased by 1
number[index] is the location location in the number array, so when index = 0, number[index] = 1993, when index = 1, number[index] = 99 and so on.
cout << number[index] << endl
will print the content of the array at the location of index to the screen and it will do this as long as index <= 5.
The endl is a newline so that the next element will be printed on a new line.
I hope this explains things to you...
|