//fun4.cpp //csci107, Laura Toma //Fill in the function ssearch #include const int size=10; //************************************************************ //a function that reads an array of n elements from the user; n is //assumed to be known void read_array(int a [], int n) { int i = 0; cout << "Please enter an array of " << n << " elements: \n"; while (i > a[i]; i = i+1; } } //************************************************************ //a function that prints an array of n elements; the array and n are //assumed to be known void print_array(int a[], int n) { cout << "the array is: "; cout << endl; } //************************************************************ a a //function that searches forthe target t in the array a of n elements //and returns the number of occurences assumed to be known; a,n and t //are assumed given int ssearch_array(int a[], int n, int t) { int occ = 0; return occ; } //************************************************************ int main() { int x[size], a, target; read_array(x,size); print_array(x,size); cout << "enter target value: "; cin >> target; a = ssearch_array(x,size,target); if (a == 0) { cout << "target not found\n"; } else { cout << "target found " << a << " times\n"; } return 1; }