Question: Create a regular function called swap that swaps any two values of an integer vector 1. Populate a 10 element vector (indices 0 through 9)

Create a regular function called swap that swaps any two values of an integer vector 1. Populate a 10 element vector (indices 0 through 9) with random integers. 2. Output to the screen the vector contents. 3. Ask the user which two indices they wish to swap and then have the function swap the two values at those indices. 4. Output to the screen the new vector contents 5. Ask the user if he wishes to swap again. Next
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
