// File: Mergesort.cpp // Mergesort example with questionable class declaration. /********************************************************* -> This C++ program is to perform Merge sort using iterative method. -> This program works in microsoft vc++ 6.0 environment. -> The numbers are sorted in increasing order. **********************************************************/ #include class sorting { private: double *array; int n; public: void input(); void output(); void mergesort(); }; void sorting::input() { cout<<"****************************************************\n" <<"This program sorts numbers in increasing order" <<"\n\t\tusing Merge sort iterative technique\n" <<"****************************************************\n"; cout<<"Enter how many numbers you are going to enter for sorting ::"; cin>>n; array=new double[n]; cout<<"Now enter your elements ::\n"; for(int i=0;i>array[i]; } void sorting::mergesort() { double *temp=new double[n]; int lowerLeft,lowerRight,upperLeft,upperRight,i; int size=1,j,k; while(size