Lesson goal: An Introduction to Arrays

Previous: Introduction | Home | Next: Arrays and averaging numbers

In a past lesson, you learned how to delcare an array, load it with some values, then display the value held at a given array position.

Since arrays have sequential elements, they are commonly "indexed" using loops. In this lesson, you'll learn how to use a for-loop to print the value of each element in an array.

Now you try. Fix the print statement, so that it will display the value of the $i^{th}$ element of the array.

Type your code here:

See your results here: