Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<vector>
- using namespace std;
- int main()
- {
- int x[1000];
- vector<int> y;
- int n;
- cin>>n;
- for(int i=0;i<n;++i)
- cin>>x[i];
- for(int i=1;i<n;i+=2)
- {
- y.push_back(x[i]);
- cout<<x[i]<<' ';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement