//Sort a given set of elements using Merge sort method and determine the time taken to sort the elements
#include
#include
#include
#define max 20
void mergesort(int a[],int low,int high);
void merge(int a[],int low,int mid,int high);
void main()
{
int n,i,a[max],ch=1;
clock_t start,end;
clrscr();
while(ch)
{
printf("\n\t enter the number of elements\n");
scanf("%d",&n);
printf("\n\t enter the elements\n");
for(i=0;i
OUTPUT Enter the number of elements 5 Enter the elements 6 3 4 1 9 The sorted array is 1 3 4 6 9 time taken=0.824176