Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- int m;
- cin >> m;
- int *a = new int[n];
- int *b = new int[m];
- for (int i = 0; i < n; i++)
- cin >> a[i];
- for (int i = 0; i < m; i++)
- cin >> b[i];
- int *c = new int[n + m];
- for (int i = 0; i < n; i++)
- {
- c[i] = a[i];
- }
- for (int i = 0; i < m; i++)
- {
- c[i + n] = b[i];
- }
- for (int i = 0; i < m + n; i++)
- cout << c[i] << " ";
- delete[] a;
- delete[] b;
- delete[] c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement