Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main()
- {
- int n = 7/2;
- vector<int> v;
- for(int i = 0 ; i < 7 ; i++)
- v.emplace_back(i);
- for(int j=0; j < 7 ; ){
- cout << v[j] << " ";
- v.erase(remove(v.begin(),v.end(),j),v.end());
- j+=n;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement