Question: Use a while loop to traverse the vector below to find all even values. For each even value found, your code should store these values

Use a while loop to traverse the vector below to find all even values. For each even value found, your code should store these values in a new array, then display this array. Even though you are specifically traversing the vector below, your code should be general enough to work on an array of any length, including length one. You must use a while loop to get full points. Do not use functions like find(). Hint: Use the function for modulus returns 0, then x is even. If mod(x,2) returns 1, then x is odd.
 Use a while loop to traverse the vector below to find

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!