Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "mSort.h"
- #include <time.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- short num = 21;
- short* a = new short[num];
- srand(time(0));
- //fill with random data
- for (short i=0; i<num; ++i)
- a[i] = rand()%200 - 100;
- //sort
- mergeSort(a, num);
- //show
- for (short i=0; i<num; ++i)
- cout<<a[i]<<" ";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement