/* Starter file for assignment 6 * Two functions are provided. You will write the 5 specified functions, * as well as a menu program to test the functions. * * */ #include using namespce std; void PrintArray (const int arr[], const int size); void FillArray(int arr[], const int size); /* Add your own function prototypes here */ int main() { /* We'll set the test size to 15. Use this constant in your calls * instead of the literal 15. Then, by changing this line, you can * easily test arrays of different sizes. */ const int SIZE = 15; /* Declare your array and write the menu loop */ return 0; } // end main() /* Add in the definitions of your own 5 functions */ /* Definitions of PrintArray and FillArray below * Written by Bob Myers for C++ */ void PrintArray(const int arr[], const int size) // this function prints the contents of the array { cout << "\nThe array:\n { "; for (int i = 0; i < size-1; i++) // print all but last item cout << arr[i] << ", "; cout << arr[size-1] << " }\n"; // print last item } void FillArray(int arr[], const int size) // this function loads the contents of the array with user-entered values { cout << "Please enter " << size << " integers to load into the array\n> "; for (int i = 0; i < size; i++) cin >> arr[i]; // enter data into array slot }