1#include <iostream>
2#include <vector>
3#include <algorithm>
4
5int main()
6{
7 std::vector<int> v = { 4, 7, 5, 2, 6, 9 };
8 int key = 6;
9
10 if (std::count(v.begin(), v.end(), key))
11 std::cout << "Element found";
12 else
13 std::cout << "Element not found";
14
15 return 0;
16}
17