//Reads in 5 scores and echos them. Demonstrates the function fill_up. #include void fill_up(int a[], int size); //Precondition: size is the declared size of the array a. //The user will type in size integers. //Postcondition: The array a is filled with size integers //from the keyboard. int main( ) { int i, a[5]; fill_up(a, 5); cout << "Echoing array:\n"; for (i = 0; i < 5; i++) cout << a[i] << endl; return 0; } //Uses iostream.h: void fill_up(int a[], int size) { cout << "Enter " << size << " numbers:\n"; for (int i = 0; i < size; i++) cin >> a[i]; size--; cout << "The last array index used is " << size << endl; }