Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
#include
using namespace std; bool greater_than_5(int value) { return value > 5; } int main() { vector
numbers = {1, 7, 3, 5, 9, 2}; if (any_of(numbers.begin(), numbers.end(), greater_than_5)) { cout << "Found a value greater than 5"; } else { cout << "No values are greater than 5"; } return 0; }
Found a value greater than 5