- #include
- #include
- #include
-
- using namespace std;
- int main() {
- vector heights = {
- 100.3,
- 120.8,
- 132.7,
- 160.4,
- 150.3,
- 144.9,
- 170.5,
- 125.6
- };
- auto myLambda = count_if(heights.begin(), heights.end(), [](int x) {
- return x > 125.00;
- });
- cout << "The number of participants will be: " << myLambda;
- return 0;
- }
The output:The number of participants will be: 5
[Program finished]Why the output is not 6?