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}; auto it = find_if_not(numbers.begin(), numbers.end(), greater_than_5); if (it != numbers.end()) { cout << "The number " << *it << " is not greater than 5."; } else { cout << "All numbers are greater than 5."; } return 0; }
The number 1 is not greater than 5.