Programming Challenge 9
Description
Using only data structures and algorithms (with lambdas) from the standard
library (no loops or named functions), perform the following:
- Generate 1,000,000 random doubles in the range [0,1].
- Copy elements less than 0.3 or greater than 0.6 into another data
structure.
- Transform these elements by rounding into integers in another data
structure.
- Sort the integers in reverse order.
- Count (and output) the number of ones and number of zeroes.
Details
- Name the files and program
lambda_practice.cpp
.
- In your top file comment, tell me the most confusing aspect to lambdas.