#include #include using namespace std; // Linear search will return the index position for // the value search for in the array. // If not found, -1 is returbed. int linear_search(int array[], int size, int value); int linear_search(int array[], int size, int value){ // Set the location where the value is found. // Default location is a "not found" position. int location=-1; // Search for the value at all the positions in the array. for(int i=0; iarray[i+1]) { myswap(array[i],array[i+1]); swapped=true; } } }while(swapped); } int main() { int numbers[]={8,10,15,6}; int size=4; int found; found=linear_search(numbers,size,10); cout << found << endl; cout << endl; //linear_sort(numbers,4); bubble_sort(numbers,4); print_array(numbers,4); return 0; }