fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7. int main (void){
  8.  
  9. vector<int> e = {10,20,30,40,50};
  10.  
  11. for (int i = 0; i <= 99; i++){
  12. if (find(e.begin(), e.end(), i) != e.end()) cout << i << " "; // utilização do find
  13. }
  14. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
10 20 30 40 50