#include <iostream>
#include <algorithm>
using namespace std::placeholders;
bool DivisibleByN(int N , int d) {
return N % d == 0;
}
int main() {
std::vector<int> vec = { 5, 2, 7, 1, 9, 21, 3, 6, 14 };
int N = 7;
int count = std::count_if(vec.cbegin(), vec.cend(), std::bind(&DivisibleByN, _1, N));
if (std::any_of(vec.cbegin(), vec.cend(), std::bind(&DivisibleByN, _1, N))) {
std::cout << "At least one number is divisible by " << N;
}
}
/*
run:
At least one number is divisible by 7
*/