The headers <algorithm> and <numeric> hold loops that are already written and tested. Each one takes a range as two iterators, usually v.begin() and v.end():
std::sort(first, last, less) sorts, using less(a, b) to decide whether a comes first.
std::find_if(first, last, pred) returns an iterator to the first element where pred is true, or last when there is none. Compare with last before you use it.
std::count_if counts the elements where a predicate is true.
std::accumulate(first, last, init) adds everything to init. The type of init is the type of the sum, so 0 adds in int and can overflow where 0LL would not.
The predicates here are lambdas, small unnamed functions written in place: [](int q) { return q >= 100; }. The next lesson looks at them closely. An algorithm call names what the loop does, which makes code quicker to review.
Sort, search with a lambda, and sum in long long.