Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<algorithm>
- using namespace std;
- mergeAndSort(int N1,char a[],int N2,char b[])
- {
- char c[N1+N2];
- for(int i=0; i<N1; i++)
- {
- c[i] = a[i];
- }
- for(int i=N1; i<N2; i++)
- {
- c[i] = b[i-N1];
- }
- }
- sort(c,c+(N1+N2))
- int main()
- {
- int N1;
- int a[N1];
- int N2;
- int b[N2;]
- mergeAndSort (N!,a,N2,b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement