First slot and last slot

Complete the previous lesson to unlock this one.

Back to the path

First slot and last slot

Level 13: Slot 1. A loop that starts at 0 walks off the front of the array. The first value you read is index 1. The last is the upper bound.

Read 4 integers into Values[1] … Values[4]. Output the first, then the last.

Example: input 8, 2, 5, 9 →

8 9