#include <algorithm>
#include <iostream>
int main(){
int n = 6;
int array[n] = {1, 5, 10 ,12, 30, 42};
int min_value = 7;
auto result = std::count_if(array,
array + n,
[min_value](int value){
return value > min_value &&
value % 5 == 0;
});
std::cout << result;
return 0;
}
Программа выведет 2