Untitled
unknown
c_cpp
4 months ago
364 B
3
Indexable
#include <iostream> #include <vector> #include <algorithm> int main() { std::vector<int> numeri = {1,2,41,37,5,6}; //{1,41,37,5,?,?} numeri.erase( std::remove_if(numeri.begin(), numeri.end(), [](int n) { return n % 2 == 0; }), numeri.end() ); for(int n: numeri){ std::cout << n << " "; } return 0; }
Editor is loading...
Leave a Comment