#include #include using namespace std; /* Your solution goes here */ void SwapVectorEnds(vector& v){ int temp; temp = v.at(0); v.at(0) = v.at(v.size()-1); v.at(v.size()-1) = temp; } int main() { vector sortVector(4); unsigned int i; int userNum; for (i = 0; i < sortVector.size(); ++i) { cin >> userNum; sortVector.at(i) = userNum; } SwapVectorEnds(sortVector); for (i = 0; i < sortVector.size(); ++i) { cout << sortVector.at(i) << " "; } cout << endl; return 0; }