1#include <iostream>
2using namespace std;
3
4// function declaration:
5double getAverage(int arr[], int size);
6
7int main () {
8 // an int array with 5 elements.
9 int balance[5] = {1000, 2, 3, 17, 50};
10 double avg;
11
12 // pass pointer to the array as an argument.
13 avg = getAverage( balance, 5 ) ;
14
15 // output the returned value
16 cout << "Average value is: " << avg << endl;
17
18 return 0;
19}