(Solved):(C++) Write a function named oddsEvens that takes in 3 integer vectors. The 1st vector will contain some number of integers and the 2nd and 3rd vectors should be passed in empty. The function shoul… View Answer…

 

Question

(C++) Write a function named oddsEvens that takes in 3 integer vectors. The 1st vector will contain some number of integers and the 2nd and 3rd vectors should be passed in empty. The function should fill the 2nd vector with all the even values in the 1st vector and fill the 3rd vector with all the odd values in the 1st vector. The first vector must remain unchanged.

For example, if

Scroll to top