Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include<iostream>
  2. #include<algorithm>
  3. using namespace std;
  4. mergeAndSort(int N1,char a[],int N2,char b[])
  5. {
  6. char c[N1+N2];
  7. for(int i=0; i<N1; i++)
  8. {
  9. c[i] = a[i];
  10. }
  11.  
  12. for(int i=N1; i<N2; i++)
  13. {
  14. c[i] = b[i-N1];
  15. }
  16. }
  17. sort(c,c+(N1+N2))
  18. int main()
  19. {
  20. int N1;
  21. int a[N1];
  22. int N2;
  23. int b[N2;]
  24. mergeAndSort (N!,a,N2,b);
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement