libdo

Untitled

Sep 26th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int n,i;
  9. vector<int>V;
  10. vector<int>::iterator it;
  11. cin>>n;
  12. while(n--)
  13. {
  14. cin>>i;
  15. V.push_back(i);
  16. }
  17. cin>>n;
  18. //it = find(V.begin(),V.end(),n);
  19. V.erase(find(V.begin(),V.end(),n));
  20. for(it=V.begin();it!=V.end();it++) cout<<*it<<endl;
  21. return 0;
  22. }
Add Comment
Please, Sign In to add comment