//Test the Merge function #include using namespace std; //Display the data set void DisplayData(int dataArray[], int TopIndex) { for(int i=0; i<=TopIndex; i++) { cout << dataArray[i] << endl; }//end for }//end DisplayArray void Merge(int A[], int TopA, int B[], int TopB, int C[]) { bool fini=false; int ptrA=0; int ptrB=0; int ptrC=0; while(!fini) { //if past end of A array //copy rest of array B to C //if past end of B array //copy rest of array A to C //if A's current element <= B's current element //copy A's current to C. //else B's current element < A's current element //copy B's current to C. }//end else }//end while }//end Merge int main() { int A[8]={2, 5, 9, 20, 24, 30}; int B[8]={1, 3, 8, 10, 15, 17, 19, 21}; int C[16]; Merge(A, 5, B, 7, C); DisplayData(C, 13); return 0; }//end main