diff --git a/Merge Sort/MergeSort.c b/Merge Sort/MergeSort.c new file mode 100644 index 0000000..0d19c38 --- /dev/null +++ b/Merge Sort/MergeSort.c @@ -0,0 +1,77 @@ +#include +#include +int count; +void mergesort(int[], int, int); +void merge(int[], int, int, int); +int main() +{ + int a[1200],b[1200],c[1200],c1,c2,c3,i,j,n; + printf("Enter the number of elements: "); + scanf("%d",&n); + printf("Enter the elements: "); + for(i = 0; i < n; i++) + scanf("%d",&a[i]); + mergesort(a,0,n-1); + printf("Sorted Array:"); + for(i=0;i