/** 10/29/2018
  * 
  */
import java.io.*;
import java.util.Scanner;

public class UsingArrays  {  
  public static void main(String[]  args) throws IOException {
    
    int[] numbers = new int[10]; // declaring an array of size 10
                                 // numbered 0 to 9
    
    System.out.println("loc 0: " + numbers[0]); // accesses loc 0 of array
    // 0 is often called the INDEX into the array, or the subscript
    numbers[1]=45;
    numbers[2]=numbers[0]+numbers[1];
    // use a loop to interate through an array
    for (int i=0; i<3; i++) {
      System.out.println("i: " + i + " " + numbers[i]);
    }  
    // numbers.length is the # of elts in any array
    for (int i=0; i<numbers.length; i++) {
      System.out.println("i: " + i + " " + numbers[i]);
    }  
  }
}