#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::vector;
int main()
{
vector<int> vec{ 1, 2, 3, 4, 5 };
vector<int>::iterator it;
it = vec.begin();
while (it != vec.end()) {
*it = *it * 2;
it++;
}
it = vec.begin();
while (it != vec.end()) {
cout << *it << " ";
it++;
}
cout << endl;
return 0;
}
/*
run:
2 4 6 8 10
*/