Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- void PrintWorryCount(const vector<bool>& is_nervous) {
- // подсчитываем количество элементов в векторе is_nervous, равных true
- std::cout << count(is_nervous.begin(), is_nervous.end(), true);
- }
- int main() {
- // не меняйте содержимое функции main
- PrintWorryCount({ true, true, false, true });
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement