//csci107, Laura Toma //sequential search using functions #include const int size=10; //************************************************************ //a function that reads an array of n elements from the user; //when calling the function, n is assumed to be known, while a[] is filled in 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 the array a[] of n elements; ///when calling the function, the array and n are assumed to be known void print_array(int a[], int n) { cout << "the array is: "; int i=0; while (i> target; //search for target in x[] a = ssearch_array(x,size,target); if (a == 0) { cout << "target not found\n"; } else { cout << "target found " << a << " times\n"; } return 1; }