This program illustrates the use of the STL swap() algorithm to swap integer values, double values, and string values in simple variables. It also illustrates the swapping of integer values in a vector, using three different ways to access the values. Press Enter to continue ... Swapping integer values in simple variables: Before swap(i1, i2) i1 = 12 i2 = -3 After swap(i1, i2) i1 = -3 i2 = 12 Press Enter to continue ... Swapping double values in simple variables: Before swap(x1, x2) x1 = 4.3 x2 = 17.5 After swap(x1, x2) x1 = 17.5 x2 = 4.3 Press Enter to continue ... Swapping string values in simple variables: Before swap(s1, s2) s1 = Hello s2 = Good-bye After swap(s1, s2) s1 = Good-bye s2 = Hello Press Enter to continue ... Now we display the values from a vector of integers. Then we swap the first and last values, the second and second last values, and the third and third last values. Each time we do a swap, we use a different way of accessing the values being swapped. Press Enter to continue ... Here are the integer values from the vector: 1 2 3 4 5 6 7 8 Press Enter to continue ... First we make the call swap(v.at(0), v.at(v.size()-1). Here are the vector values with the first and last ones swapped: 8 2 3 4 5 6 7 1 Press Enter to continue ... Next we make the call swap(v[1], v[v.size()-2]). Here are the vector values with the 2nd and 2nd-last ones swapped: 8 7 3 4 5 6 2 1 Press Enter to continue ... Finally we make the call swap(*(v.begin()+2), *(v.end()-3)). Here are the vector values with the 3rd and 3rd-last ones swapped: 8 7 6 4 5 3 2 1 Press Enter to continue ...