fork(2) download
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. int main() {
  5. int myarray[6]{10, 4, 14, 84, 1, 3};
  6.  
  7. if (std::find(std::begin(myarray), std::end(myarray), 1) != std::end(myarray))
  8. std::cout << "It exists";
  9. else
  10. std::cout << "It does not exist";
  11. return 0;
  12. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
It exists