#include <iostream>

using namespace std;

// A global variable that is a constant.
const int ARRAY_SIZE=3;

int main() {
    int grades[ARRAY_SIZE];

    grades[0]=90;
    grades[1]=95;
    grades[2]=100;


    cout << "Size of an int: " << sizeof(int) << endl;
    cout << "Size of the grades array: " << sizeof(grades) << endl;

    cout << "Amount of array = " << sizeof(grades)/sizeof(int) << endl;
    cout << endl;

    // i represents the array index.
    // Print out all the elements in the array.
    for(int i=0;i<ARRAY_SIZE;i++)
        cout << "grades[" << i << "] = " << grades[i] << endl;

    cout << endl;

    // Print backwards.
    for(int i=ARRAY_SIZE-1;i>=0;i--)
        cout << "grades[" << i << "] = " << grades[i] << endl;
}
