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