Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
#include
using namespace std; int main() { vector
numbers1 = {1, 4, 9, 16}; vector
numbers2 = {2, 4, 6, 8}; vector
merged(8); merge(numbers1.begin(), numbers1.end(), numbers2.begin(), numbers2.end(), merged.begin()); for (int item : merged) { cout << item << " "; } return 0; }
1 2 4 4 6 8 9 16