You are on page 1of 1

#include <iostream>

#include <algorithm>
#include <vector>
using namespace std;

int main () {
int mynumbers[] = { 3, 9, 0, 2, 2, 2, 5 };
vector<int> v (mynumbers, mynumbers + 7);
vector<int>::iterator it = v.begin();

while ( (it = adjacent_find (it, v.end())) != v.end()) {//LINE I


cout<<it-v.begin()<<", ";it--;//LINE II
}
cout<< endl;
return 0;
}

codigo para siempre

You might also like