#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;
 
int main()
{
    vector <int> myVec = { 5, 12, 521, 9 };
    
    for ( auto it : myVec )
     cout << it << endl;
     
    for_each( begin(myVec), end(myVec), [&](const int & ref){
    	cout << 2*ref << endl;
    });
    
    return 0;
}