// File: MergeSortRec.cpp // Recursive mergesort example #include using namespace std; class Mergesort { public: void input(); void mergesort(double *,int ); void merge(double*,int,double*,int,double*,int); void output(); }; int n; double *array; void Mergesort::input() { cout<<"Enter the no of elements to be sorted ::"; cin>>n; cout<<"Now enter "<>array[i]; } // sorting arr, which has n items void Mergesort::mergesort(double *arr,int n) { int i,j; if(n>1) { // copy the first half to array lower double *lower; lower=new double[n/2]; for(i=0;i