Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
std::vector<int> v = {10, 15, 20, 25};
auto it = std::find_if(v.begin(), v.end(), [](int x) { return x > 18; });
if (it != v.end()) std::cout << *it;
return 0;
}Coding works best on desktop or with an external keyboard.