/* This program demonstrates arrays. It shows how arrays are declared, initialized, used and copied. * It also shows how the random number generator available with C++ is used. */ #include #include //for the random number generator int main() { // declaring an integer array using set notation // If the array is small enough, and we know, for sure, what values // are in the array, we can use set notation int arr[10] = {1, 4, -3, 5, 18, -9, 56, 12}; // If we don't give it enough values, the array is filled out with 0's // If we give too many elements, it will cause an error // int numbers[5] = {1,2,3,4 ,5,6,7,8}; //error /*We cannot split this up into 2 lines, like we culd for single varibales.*/ //We use the index notation to access individual variables. cout<