Question: Write a C++ Program to accept N integers and store them in a vector. Create 2 new vectors - one to hold the odd integers

Write a C++ Program to accept N integers and store them in a vector. Create 2 new vectors - one to hold the odd integers and one to hold the even integers. Display the contents of both vectors.

For example:

Enter the size of vector: 6 Enter the elements (integers) of the vector: 0 1 2 3 4 5 The elements of the odd vector are: 1 3 5 The elements of the even vector are: 0 2 4 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!