Question: Write and test a function to display the values in a vector of ints, that is passed in . Put all values on one line,
Write and test a function to display the values in a vector of ints, that is passed in
Put all values on one line, followed by a newline at the end.
Write and test a function to double the values in a vector of ints, ie modifying the contents of the vector, using a traditional for loop to iterate over the vector.
Use your display function to make sure you were successful
Write and yes again, test a function to double the values in a vector of ints, however this time using a ranged for loop to iterate over the vector.
To actually change the values our loop variable cant be making copies of the entries in the vector.
Instead it needs to be a reference.
Of course, again test your code using your display function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
